Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -164,13 +164,14 @@ def create_interface():
|
|
164 |
|
165 |
# Event handlers
|
166 |
def update_image(image_path):
|
167 |
-
if not image_path:
|
168 |
return None
|
169 |
try:
|
170 |
resized_path = annotation_mgr.process_image_upload(image_path)
|
171 |
return resized_path
|
172 |
except Exception as e:
|
173 |
-
|
|
|
174 |
|
175 |
# Handle image upload and resizing
|
176 |
bbox_input.upload(
|
|
|
164 |
|
165 |
# Event handlers
|
166 |
def update_image(image_path):
|
167 |
+
if not image_path or not isinstance(image_path, (str, Path)):
|
168 |
return None
|
169 |
try:
|
170 |
resized_path = annotation_mgr.process_image_upload(image_path)
|
171 |
return resized_path
|
172 |
except Exception as e:
|
173 |
+
print(f"Error processing image: {e}")
|
174 |
+
return image_path
|
175 |
|
176 |
# Handle image upload and resizing
|
177 |
bbox_input.upload(
|