Skip to content

Commit

Permalink
Merge pull request #765 from wu-victor/patch-1
Browse files Browse the repository at this point in the history
Refactor if else statement for demo path
  • Loading branch information
mrdbourke authored Aug 21, 2024
2 parents 21455a2 + e7e6db8 commit a6665d9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions 09_pytorch_model_deployment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3111,12 +3111,9 @@
"# Remove files that might already exist there and create new directory\n",
"if foodvision_mini_demo_path.exists():\n",
" shutil.rmtree(foodvision_mini_demo_path)\n",
" foodvision_mini_demo_path.mkdir(parents=True, # make the parent folders?\n",
" exist_ok=True) # create it even if it already exists?\n",
"else:\n",
" # If the file doesn't exist, create it anyway\n",
" foodvision_mini_demo_path.mkdir(parents=True, \n",
" exist_ok=True)\n",
"# If the file doesn't exist, create it anyway\n",
"foodvision_mini_demo_path.mkdir(parents=True, \n",
" exist_ok=True)\n",
" \n",
"# Check what's in the folder\n",
"!ls demos/foodvision_mini/"
Expand Down

0 comments on commit a6665d9

Please sign in to comment.