Refactor if else statement for demo path

This commit is contained in:
Victor Wu authored and GitHub committed 2023-12-20 12:40:55 -05:00
1 parent 302ea8d0a6
commit e7e6db883a
1 file changed
+3 -6
+3 -6
View File
@@ -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/"