gstaff commited on
Commit
af469f8
β€’
1 Parent(s): ae41343

Fix guess logic

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ with gr.Blocks(theme='gstaff/xkcd') as demo:
34
 
35
  def bot(history):
36
  user_input = history[-1][0]
37
- if game.secret_word in user_input.strip().lower().split():
38
  history[-1][1] = f"You win, the word was {game.secret_word}!"
39
  return history
40
  if user_input.strip().lower() in game.word_list:
 
34
 
35
  def bot(history):
36
  user_input = history[-1][0]
37
+ if game.secret_word == user_input.strip().lower():
38
  history[-1][1] = f"You win, the word was {game.secret_word}!"
39
  return history
40
  if user_input.strip().lower() in game.word_list: