mrprimenotes commited on
Commit
d85e310
·
verified ·
1 Parent(s): 0e6f2ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- return None
 
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(