Spaces:
Runtime error
Runtime error
Return cropped images if fail
#4
by
Not-Adam
- opened
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)
|