rbarman commited on
Commit
235c93b
·
1 Parent(s): d498095

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- print(model.config.id2label[predicted_label])
 
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"