Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
| 16 |
def predict(input, history=[]):
|
| 17 |
# tokenize the new input sentence
|
| 18 |
new_user_input_ids = tokenizer.encode(
|
| 19 |
-
input + tokenizer.eos_token, return_tensors="pt"
|
| 20 |
)
|
| 21 |
|
| 22 |
# append the new user input tokens to the chat history
|
|
|
|
| 16 |
def predict(input, history=[]):
|
| 17 |
# tokenize the new input sentence
|
| 18 |
new_user_input_ids = tokenizer.encode(
|
| 19 |
+
input + tokenizer.eos_token, padding=True, truncation=True, return_tensors="pt"
|
| 20 |
)
|
| 21 |
|
| 22 |
# append the new user input tokens to the chat history
|