Spaces:
Runtime error
Runtime error
SpiketheCowboy
commited on
Commit
•
b2c66cc
1
Parent(s):
9869274
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ with gr.Blocks() as demo:
|
|
90 |
)
|
91 |
# batch = {k: v.cuda() for k, v in batch.items()} # Using CPU only
|
92 |
generated = model.generate(batch["input_ids"], max_length=1024, temperature=0.8)
|
93 |
-
bot_message = tokenizer.decode(generated[0][:-
|
94 |
|
95 |
chat_history.append((message, bot_message))
|
96 |
time.sleep(1)
|
|
|
90 |
)
|
91 |
# batch = {k: v.cuda() for k, v in batch.items()} # Using CPU only
|
92 |
generated = model.generate(batch["input_ids"], max_length=1024, temperature=0.8)
|
93 |
+
bot_message = tokenizer.decode(generated[0][:-2]).split("### Assistant:\n", 1)[1]
|
94 |
|
95 |
chat_history.append((message, bot_message))
|
96 |
time.sleep(1)
|