smhavens commited on
Commit
7e8fbf3
1 Parent(s): a32aae4

Bug Fix: switched markdown text to use protected_guess instead of guess due to strange variable changes.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -219,12 +219,12 @@ def check_answer(guess:str):
219
  # print("IS", protected_guess, "EQUAL TO", answer, ":", protected_guess.lower() == answer.lower())
220
 
221
  if protected_guess.lower() == answer.lower():
222
- return_guesses.append(f"{word1} is to {word2} as {word3} is to {protected_guess}.")
223
  output += f"<span style='color:green'>- {return_guesses[-1]}</span><br>"
224
  new_prompt = generate_prompt(model)
225
  return new_prompt, "Correct!", output
226
  else:
227
- return_guess = f"{guess}: {word1} is to {word2} as {other_word} is to {protected_guess}."
228
  return_guesses.append(return_guess)
229
  output += ("- " + return_guess + " <br>")
230
  return prompt, "Try again!", output
 
219
  # print("IS", protected_guess, "EQUAL TO", answer, ":", protected_guess.lower() == answer.lower())
220
 
221
  if protected_guess.lower() == answer.lower():
222
+ return_guesses.append(f"{protected_guess}: {word1} is to {word2} as {word3} is to {protected_guess}.")
223
  output += f"<span style='color:green'>- {return_guesses[-1]}</span><br>"
224
  new_prompt = generate_prompt(model)
225
  return new_prompt, "Correct!", output
226
  else:
227
+ return_guess = f"{protected_guess}: {word1} is to {word2} as {other_word} is to {protected_guess}."
228
  return_guesses.append(return_guess)
229
  output += ("- " + return_guess + " <br>")
230
  return prompt, "Try again!", output