Update app.py
Browse files
app.py
CHANGED
@@ -75,13 +75,13 @@ async def try_on(
|
|
75 |
|
76 |
return response.json()
|
77 |
|
78 |
-
except Exception as e:
|
79 |
# Clean up in case of any errors
|
80 |
if os.path.exists(human_path):
|
81 |
-
|
82 |
if os.path.exists(garment_path):
|
83 |
-
|
84 |
-
raise HTTPException(status_code=500, detail=str(e))
|
85 |
|
86 |
finally:
|
87 |
human_img.file.close()
|
|
|
75 |
|
76 |
return response.json()
|
77 |
|
78 |
+
'''except Exception as e:
|
79 |
# Clean up in case of any errors
|
80 |
if os.path.exists(human_path):
|
81 |
+
os.remove(human_path)
|
82 |
if os.path.exists(garment_path):
|
83 |
+
os.remove(garment_path)
|
84 |
+
raise HTTPException(status_code=500, detail=str(e))'''
|
85 |
|
86 |
finally:
|
87 |
human_img.file.close()
|