Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,8 @@ def predict(image):
|
|
14 |
|
15 |
# model predicts one of the 1000 ImageNet classes
|
16 |
predicted_label = logits.argmax(-1).item()
|
17 |
-
|
|
|
18 |
|
19 |
# setup Gradio interface
|
20 |
title = "Image classifier"
|
|
|
14 |
|
15 |
# model predicts one of the 1000 ImageNet classes
|
16 |
predicted_label = logits.argmax(-1).item()
|
17 |
+
prediction = model.config.id2label[predicted_label]
|
18 |
+
return prediction
|
19 |
|
20 |
# setup Gradio interface
|
21 |
title = "Image classifier"
|