Update app.py
Browse files
app.py
CHANGED
@@ -60,6 +60,8 @@ def classify_image(inp):
|
|
60 |
logging.warning("4")
|
61 |
|
62 |
image = inp
|
|
|
|
|
63 |
# Resize image to 224x224
|
64 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|
65 |
|
|
|
60 |
logging.warning("4")
|
61 |
|
62 |
image = inp
|
63 |
+
if image.mode != "RGB":
|
64 |
+
image = image.convert("RGB")
|
65 |
# Resize image to 224x224
|
66 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|
67 |
|