lelouch0110 commited on
Commit
23b41f2
·
verified ·
1 Parent(s): 22c0b35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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