mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
update demo download code
This commit is contained in:
1 parent
d092e166a4
commit
6483708936
1 file changed
+36
-18
@@ -1544,30 +1544,29 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 78,
|
||||
"execution_count": 88,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" adding: demos/foodvision_mini/ (stored 0%)\n",
|
||||
" adding: demos/foodvision_mini/app.py (deflated 49%)\n",
|
||||
" adding: demos/foodvision_mini/09_pretrained_effnetb2_feature_extractor_pizza_steak_sushi_20_percent.pth (deflated 8%)\n",
|
||||
" adding: demos/foodvision_mini/requirements.txt (deflated 4%)\n",
|
||||
" adding: demos/foodvision_mini/model.py (deflated 46%)\n",
|
||||
" adding: demos/foodvision_mini/flagged/ (stored 0%)\n",
|
||||
" adding: demos/foodvision_mini/examples/ (stored 0%)\n",
|
||||
" adding: demos/foodvision_mini/examples/3622237.jpg (deflated 0%)\n",
|
||||
" adding: demos/foodvision_mini/examples/592799.jpg (deflated 1%)\n",
|
||||
" adding: demos/foodvision_mini/examples/2582289.jpg (deflated 17%)\n",
|
||||
"updating: 09_pretrained_effnetb2_feature_extractor_pizza_steak_sushi_20_percent.pth (deflated 8%)\n",
|
||||
"updating: app.py (deflated 49%)\n",
|
||||
"updating: examples/ (stored 0%)\n",
|
||||
"updating: examples/3622237.jpg (deflated 0%)\n",
|
||||
"updating: examples/592799.jpg (deflated 1%)\n",
|
||||
"updating: examples/2582289.jpg (deflated 17%)\n",
|
||||
"updating: flagged/ (stored 0%)\n",
|
||||
"updating: model.py (deflated 46%)\n",
|
||||
"updating: requirements.txt (deflated 4%)\n",
|
||||
"Not running in Google Colab, can't use google.colab.files.download()\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Zip foodvision_mini folder but exclude certain files\n",
|
||||
"!zip -r demos/foodvision_mini.zip demos/foodvision_mini -x \"*.pyc\" \"*.ipynb\" \"*__pycache__*\" \"*ipynb_checkpoints*\"\n",
|
||||
"!cd demos/foodvision_mini && zip -r ../foodvision_mini.zip * -x \"*.pyc\" \"*.ipynb\" \"*__pycache__*\" \"*ipynb_checkpoints*\"\n",
|
||||
"\n",
|
||||
"# Download the zipped FoodVision Mini app (if running in Google Colab)\n",
|
||||
"try:\n",
|
||||
@@ -2189,19 +2188,38 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### TK - Download FoodVision Big app files from Google Colab (if necessary)"
|
||||
"### TK - Download FoodVision Big app files"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 89,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" adding: 09_pretrained_effnetb2_feature_extractor_food101_20_percent.pth (deflated 8%)\n",
|
||||
" adding: app.py (deflated 49%)\n",
|
||||
" adding: class_names.txt (deflated 48%)\n",
|
||||
" adding: examples/ (stored 0%)\n",
|
||||
" adding: examples/04-pizza-dad.jpeg (deflated 0%)\n",
|
||||
" adding: flagged/ (stored 0%)\n",
|
||||
" adding: model.py (deflated 46%)\n",
|
||||
" adding: requirements.txt (deflated 4%)\n",
|
||||
"Not running in Google Colab, can't use google.colab.files.download()\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"try: \n",
|
||||
"# Zip foodvision_big folder but exclude certain files\n",
|
||||
"!cd demos/foodvision_big && zip -r ../foodvision_big.zip * -x \"*.pyc\" \"*.ipynb\" \"*__pycache__*\" \"*ipynb_checkpoints*\"\n",
|
||||
"\n",
|
||||
"# Download the zipped FoodVision Big app (if running in Google Colab)\n",
|
||||
"try:\n",
|
||||
" from google.colab import files\n",
|
||||
" !zip -r foodvision_big.zip demos/food_vision_big\n",
|
||||
" files.download(\"foodvision_big.zip\")\n",
|
||||
" files.download(\"demos/foodvision_big.zip\")\n",
|
||||
"except:\n",
|
||||
" print(\"Not running in Google Colab, can't use google.colab.files.download()\")"
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user