hasibzunair commited on
Commit
602f825
·
1 Parent(s): e8e545e
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,12 +35,12 @@ def preprocess_image(img_array):
35
  return img_array
36
 
37
 
38
- def inference(image):
39
  img = preprocess_image(img)
40
  preds = model.predict(img)
41
  img = np.expand_dims(img, 0)
42
  # Predict
43
- preds = model.predict(image)[0]
44
  labels_probs = {labels[i]: float(preds[i]) for i, _ in enumerate(labels)}
45
  return labels_probs
46
 
 
35
  return img_array
36
 
37
 
38
+ def inference(img):
39
  img = preprocess_image(img)
40
  preds = model.predict(img)
41
  img = np.expand_dims(img, 0)
42
  # Predict
43
+ preds = model.predict(img)[0]
44
  labels_probs = {labels[i]: float(preds[i]) for i, _ in enumerate(labels)}
45
  return labels_probs
46