Spaces:
Runtime error
Runtime error
add: top 3
Browse files
app.py
CHANGED
|
@@ -61,9 +61,9 @@ def get_results(image):
|
|
| 61 |
plt.axis("off")
|
| 62 |
|
| 63 |
prediction = tf.nn.softmax(logits, axis=-1)
|
| 64 |
-
prediction = prediction.numpy()[0]
|
| 65 |
|
| 66 |
-
return plt, {labels[i]:
|
| 67 |
|
| 68 |
iface = gr.Interface(
|
| 69 |
fn=get_results,
|
|
|
|
| 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 |
|
| 68 |
iface = gr.Interface(
|
| 69 |
fn=get_results,
|