Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -138,14 +138,6 @@ def predict():
|
|
138 |
'image_url': None,
|
139 |
'error': str(e)
|
140 |
})
|
141 |
-
finally:
|
142 |
-
# Clean up: delete the temporary uploaded file
|
143 |
-
if file_path and os.path.exists(file_path):
|
144 |
-
try:
|
145 |
-
os.remove(file_path)
|
146 |
-
print(f"Deleted uploaded file: {file_path}")
|
147 |
-
except Exception as e:
|
148 |
-
print(f"Error deleting file {file_path}: {e}")
|
149 |
else:
|
150 |
# Handle invalid file types
|
151 |
results.append({
|
|
|
138 |
'image_url': None,
|
139 |
'error': str(e)
|
140 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
else:
|
142 |
# Handle invalid file types
|
143 |
results.append({
|