Spaces:
Sleeping
Sleeping
Update app.py
#2
by
lelouch0110
- opened
app.py
CHANGED
|
@@ -59,7 +59,8 @@ def classify_image(inp):
|
|
| 59 |
logging.warning("4")
|
| 60 |
|
| 61 |
image = inp
|
| 62 |
-
|
|
|
|
| 63 |
# Resize image to 224x224
|
| 64 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|
| 65 |
|
|
|
|
| 59 |
logging.warning("4")
|
| 60 |
|
| 61 |
image = inp
|
| 62 |
+
if image.mode != "RGB":
|
| 63 |
+
image = image.convert("RGB")
|
| 64 |
# Resize image to 224x224
|
| 65 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|
| 66 |
|