Spaces:
Runtime error
Runtime error
Commit
Β·
0a8b0b0
1
Parent(s):
da7b1b8
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def predict(input, history=[]):
|
|
| 26 |
bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)
|
| 27 |
|
| 28 |
# generate a response
|
| 29 |
-
history = model.generate(bot_input_ids
|
| 30 |
|
| 31 |
# convert the tokens to text, and then split the responses into the right format
|
| 32 |
response = tokenizer.decode(history[0]).split("<|endoftext|>")
|
|
|
|
| 26 |
bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)
|
| 27 |
|
| 28 |
# generate a response
|
| 29 |
+
history = model.generate(**bot_input_ids)
|
| 30 |
|
| 31 |
# convert the tokens to text, and then split the responses into the right format
|
| 32 |
response = tokenizer.decode(history[0]).split("<|endoftext|>")
|