KaburaJ commited on
Commit
60fef1f
·
1 Parent(s): 7ff5936

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -106,11 +106,12 @@ def main():
106
 
107
  if pred_button:
108
 
109
- outputs = int(model.predict(image))
110
  _, y_hat = outputs.max(1)
111
- predicted_idx = str(y_hat.item())
112
- right_column.title("Prediction")
113
- right_column.write(predicted_idx)
 
114
 
115
 
116
  if __name__ == '__main__':
 
106
 
107
  if pred_button:
108
 
109
+ outputs = model.predict(image)
110
  _, y_hat = outputs.max(1)
111
+ # predicted_idx = str(y_hat.item())
112
+ # right_column.title("Prediction")
113
+ # right_column.write(predicted_idx)
114
+ right_column.write(decode_predictions(outputs, top=3)[0])
115
 
116
 
117
  if __name__ == '__main__':