Merge pull request #765 from wu-victor/patch-1

Refactor if else statement for demo path
This commit is contained in:
Daniel Bourke authored and GitHub committed 2024-08-21 20:37:20 +10:00
commit a6665d965d
1 file changed
+3 -6
+3 -6
View File
@@ -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/"