Spaces:
Runtime error
Runtime error
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))
|
| 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))
|