mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Refactor if else statement for demo path
This commit is contained in:
1 parent
302ea8d0a6
commit
e7e6db883a
1 file changed
+3
-6
@@ -3110,12 +3110,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/"
|
||||
|
||||
Reference in new issue
Block a user