From e7e6db883a42fc038afc6f443b6eb85fbda43626 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Wed, 20 Dec 2023 12:40:55 -0500 Subject: [PATCH] Refactor if else statement for demo path --- 09_pytorch_model_deployment.ipynb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/09_pytorch_model_deployment.ipynb b/09_pytorch_model_deployment.ipynb index 37647d8c..2da3cfdb 100644 --- a/09_pytorch_model_deployment.ipynb +++ b/09_pytorch_model_deployment.ipynb @@ -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/"