Spaces:
Runtime error
Runtime error
Commit
Β·
ee4d46e
1
Parent(s):
bd0beac
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def predict(input, history=[]):
|
|
| 30 |
|
| 31 |
# convert the tokens to text, and then split the responses into the right format
|
| 32 |
response = tokenizer.decode(history[0]).replace("<s>","").split("</s>")
|
| 33 |
-
response = [(response[i], response[i+1]) for i in range(0, len(response), 2)] # convert to tuples of list
|
| 34 |
return response, history
|
| 35 |
|
| 36 |
gr.Interface(
|
|
|
|
| 30 |
|
| 31 |
# convert the tokens to text, and then split the responses into the right format
|
| 32 |
response = tokenizer.decode(history[0]).replace("<s>","").split("</s>")
|
| 33 |
+
response = [(response[i], response[i+1]) for i in range(0, len(response)-2, 2)] # convert to tuples of list
|
| 34 |
return response, history
|
| 35 |
|
| 36 |
gr.Interface(
|