Philipp Normann commited on
Commit
628ad7b
·
1 Parent(s): d9bafc3

Add AI guess confirmation message

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -101,6 +101,10 @@ def process_image(image, current_word):
101
  "green" if word == current_word else "tab:blue"
102
  for word in predictions_df["word"]
103
  ]
 
 
 
 
104
  ax.barh(predictions_df["word"], predictions_df["prob"], color=colors)
105
  ax.set_title("Top 10 Predictions", pad=15)
106
  ax.set_xlabel("Probability")
 
101
  "green" if word == current_word else "tab:blue"
102
  for word in predictions_df["word"]
103
  ]
104
+
105
+ if current_word in predictions_df["word"]:
106
+ gr.Info("AI guessed the word correctly! 🎉")
107
+
108
  ax.barh(predictions_df["word"], predictions_df["prob"], color=colors)
109
  ax.set_title("Top 10 Predictions", pad=15)
110
  ax.set_xlabel("Probability")