hilalrd commited on
Commit
206eb02
1 Parent(s): 961becc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -54,12 +54,11 @@ def run():
54
 
55
  if upload is not None:
56
  img = Image.open(upload)
57
- img = img.resize((224, 224, 3))
58
  img_array = np.array(img)
59
  img_array = img_array / 255.0
60
  img_array = np.expand_dims(img_array, axis=0)
61
-
62
-
63
  # Model inference
64
  images = np.vstack([img_array])
65
  classes = model_cnn.predict(images)
 
54
 
55
  if upload is not None:
56
  img = Image.open(upload)
57
+ img = img.resize((224, 224)).convert("RGB")
58
  img_array = np.array(img)
59
  img_array = img_array / 255.0
60
  img_array = np.expand_dims(img_array, axis=0)
61
+
 
62
  # Model inference
63
  images = np.vstack([img_array])
64
  classes = model_cnn.predict(images)