Not-Adam commited on
Commit
34e6e0e
1 Parent(s): ad3fae5

Return cropped images if fail (#4)

Browse files

- Return cropped images if fail (0874effbbb98e19fcac05effa006dfac3e69199a)

Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -520,6 +520,7 @@ def get_cropped_images(images, category):
520
  cropped_list.append(image)
521
  except Exception as e:
522
  print(f"Error processing image {num}: {e}")
 
523
 
524
  # Convert cropped images to base64 strings
525
  base64_images = encode_images_to_base64(cropped_list)
 
520
  cropped_list.append(image)
521
  except Exception as e:
522
  print(f"Error processing image {num}: {e}")
523
+ return []
524
 
525
  # Convert cropped images to base64 strings
526
  base64_images = encode_images_to_base64(cropped_list)