alexnasa commited on
Commit
040b217
·
verified ·
1 Parent(s): 0f62662

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -171,6 +171,11 @@ def run_triposg(image_path: str,
171
 
172
 
173
  export_dir = os.path.join(os.environ["PARTCRAFTER_PROCESSED"], session_id)
 
 
 
 
 
174
  os.makedirs(export_dir, exist_ok=True)
175
 
176
  parts = []
 
171
 
172
 
173
  export_dir = os.path.join(os.environ["PARTCRAFTER_PROCESSED"], session_id)
174
+
175
+ # If it already exists, delete it (and all its contents)
176
+ if os.path.exists(export_dir):
177
+ shutil.rmtree(export_dir)
178
+
179
  os.makedirs(export_dir, exist_ok=True)
180
 
181
  parts = []