Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,8 @@ import os
|
|
| 17 |
|
| 18 |
# }
|
| 19 |
def array_to_image_path(image_array):
|
|
|
|
|
|
|
| 20 |
# Convert numpy array to PIL Image
|
| 21 |
img = Image.fromarray(np.uint8(image_array))
|
| 22 |
|
|
|
|
| 17 |
|
| 18 |
# }
|
| 19 |
def array_to_image_path(image_array):
|
| 20 |
+
if image_array is None:
|
| 21 |
+
raise ValueError("No image provided. Please upload an image before submitting.")
|
| 22 |
# Convert numpy array to PIL Image
|
| 23 |
img = Image.fromarray(np.uint8(image_array))
|
| 24 |
|