leduccam commited on
Commit
0f1ab87
·
1 Parent(s): 5a46e24
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def classify_image(img):
53
  img = tf.convert_to_tensor(img, dtype=tf.float32)
54
  img = tf.expand_dims(img, axis=0)
55
  # probs = model.predict(img).flatten()
56
- probs = (model(img)).flatten()
57
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
58
 
59
  image = gr.inputs.Image(shape=(256, 256))
 
53
  img = tf.convert_to_tensor(img, dtype=tf.float32)
54
  img = tf.expand_dims(img, axis=0)
55
  # probs = model.predict(img).flatten()
56
+ probs = (model(img))[0]
57
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
58
 
59
  image = gr.inputs.Image(shape=(256, 256))