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

Shorten instructions to help smaller model.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,7 +40,7 @@ with gr.Blocks(theme='gstaff/xkcd') as demo:
40
  if user_input.strip().lower() in game.word_list:
41
  history[-1][1] = "Wrong guess, try again."
42
  return history
43
- instructions = f"The secret word is {game.secret_word}. Answer this question to give a hint without saying the word: {user_input}"
44
  bot_message = model(instructions, max_length=256, do_sample=True)[0]['generated_text']
45
  response = bot_message.replace(game.secret_word, "?????").replace(game.secret_word.title(), "?????")
46
  history[-1][1] = response
 
40
  if user_input.strip().lower() in game.word_list:
41
  history[-1][1] = "Wrong guess, try again."
42
  return history
43
+ instructions = f"The secret word is {game.secret_word}. {user_input}"
44
  bot_message = model(instructions, max_length=256, do_sample=True)[0]['generated_text']
45
  response = bot_message.replace(game.secret_word, "?????").replace(game.secret_word.title(), "?????")
46
  history[-1][1] = response