Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def predict(image):
|
|
50 |
try:
|
51 |
print(f"Received image input: {image}")
|
52 |
|
53 |
-
# Check if the input is a PIL Image type (Gradio
|
54 |
if not isinstance(image, Image.Image):
|
55 |
return json.dumps({"error": "Invalid image format received. Please provide a valid image."})
|
56 |
|
|
|
50 |
try:
|
51 |
print(f"Received image input: {image}")
|
52 |
|
53 |
+
# Check if the input is a PIL Image type (Gradio automatically provides a PIL image)
|
54 |
if not isinstance(image, Image.Image):
|
55 |
return json.dumps({"error": "Invalid image format received. Please provide a valid image."})
|
56 |
|