Spaces:
Runtime error
Runtime error
kingabzpro
commited on
Commit
•
4f7978d
1
Parent(s):
2cf77a9
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def predict(input, history=[]):
|
|
32 |
history = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id).tolist()
|
33 |
|
34 |
# convert the tokens to text, and then split the responses into the right format
|
35 |
-
response = tokenizer.decode(history[0]).
|
36 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
37 |
return response, history
|
38 |
|
|
|
32 |
history = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id).tolist()
|
33 |
|
34 |
# convert the tokens to text, and then split the responses into the right format
|
35 |
+
response = tokenizer.decode(history[0]).split("<|endoftext|>")
|
36 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
37 |
return response, history
|
38 |
|