Spaces:
Runtime error
Runtime error
darpan-jain
commited on
Commit
•
8936ba0
1
Parent(s):
61ca66a
Fixing the response from bot method
Browse files
app.py
CHANGED
@@ -33,9 +33,6 @@ with gr.Blocks() as demo:
|
|
33 |
response = tokenizer.decode(history[0]).split("<|endoftext|>")
|
34 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
35 |
|
36 |
-
# Add the new response to the chat history
|
37 |
-
history = history + [tokenizer.encode(response[0][0] + tokenizer.eos_token, return_tensors='pt')]
|
38 |
-
|
39 |
return history
|
40 |
|
41 |
|
|
|
33 |
response = tokenizer.decode(history[0]).split("<|endoftext|>")
|
34 |
response = [(response[i], response[i+1]) for i in range(0, len(response)-1, 2)] # convert to tuples of list
|
35 |
|
|
|
|
|
|
|
36 |
return history
|
37 |
|
38 |
|