Spaces:
Runtime error
Runtime error
Shorten instructions to help smaller model.
Browse files
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}.
|
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
|