Spaces:
Sleeping
Sleeping
Fixed batch prediction
Browse files
app.py
CHANGED
|
@@ -198,6 +198,8 @@ def prev_crop_preview() -> str:
|
|
| 198 |
Preview for the current cropped image
|
| 199 |
"""
|
| 200 |
global autocrop, current_image, temp_files
|
|
|
|
|
|
|
| 201 |
img = Image.open(current_image).convert("RGB")
|
| 202 |
if autocrop:
|
| 203 |
box = cropped_img(img)
|
|
|
|
| 198 |
Preview for the current cropped image
|
| 199 |
"""
|
| 200 |
global autocrop, current_image, temp_files
|
| 201 |
+
if current_image is None:
|
| 202 |
+
return None
|
| 203 |
img = Image.open(current_image).convert("RGB")
|
| 204 |
if autocrop:
|
| 205 |
box = cropped_img(img)
|