Spaces:
Runtime error
Runtime error
add: fix prediction shape
Browse files
app.py
CHANGED
@@ -61,6 +61,7 @@ def get_results(image):
|
|
61 |
plt.axis("off")
|
62 |
|
63 |
prediction = tf.nn.softmax(logits, axis=-1)
|
|
|
64 |
|
65 |
return plt, {labels[i]: float(prediction[i]) for i in range(10)}
|
66 |
|
|
|
61 |
plt.axis("off")
|
62 |
|
63 |
prediction = tf.nn.softmax(logits, axis=-1)
|
64 |
+
prediction = prediction.numpy()[0]
|
65 |
|
66 |
return plt, {labels[i]: float(prediction[i]) for i in range(10)}
|
67 |
|