Spaces:
Build error
Build error
fix preassigment
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def chat(message, history):
|
|
| 14 |
f1 = lambda x: x[2]
|
| 15 |
f2 = lambda x: x[3]
|
| 16 |
bot_input_ids = [f(item) for item in history for f in (f1, f2)]
|
| 17 |
-
bot_input_ids = torch.cat([bot_input_ids, new_user_input_ids], dim=-1)
|
| 18 |
# generated a response while limiting the total chat history to 1000 tokens,
|
| 19 |
chat_history_ids = model.generate(bot_input_ids, max_length=5000, pad_token_id=tokenizer.eos_token_id)
|
| 20 |
print("The text is ", [text])
|
|
|
|
| 14 |
f1 = lambda x: x[2]
|
| 15 |
f2 = lambda x: x[3]
|
| 16 |
bot_input_ids = [f(item) for item in history for f in (f1, f2)]
|
| 17 |
+
bot_input_ids = torch.cat([bot_input_ids, new_user_input_ids], dim=-1)
|
| 18 |
# generated a response while limiting the total chat history to 1000 tokens,
|
| 19 |
chat_history_ids = model.generate(bot_input_ids, max_length=5000, pad_token_id=tokenizer.eos_token_id)
|
| 20 |
print("The text is ", [text])
|