Spaces:
Build error
Build error
ShAnSantosh
commited on
Commit
•
9d6871d
1
Parent(s):
95ebfbd
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ def predict(sentence, history=[]):
|
|
66 |
if tag == intent["tag"]:
|
67 |
reply = [random.choice(intent['responses'])]
|
68 |
history.append((sentence, reply))
|
69 |
-
|
|
|
70 |
|
71 |
import gradio as gr
|
72 |
|
|
|
66 |
if tag == intent["tag"]:
|
67 |
reply = [random.choice(intent['responses'])]
|
68 |
history.append((sentence, reply))
|
69 |
+
response = [(history[i], history[i+1]) for i in range(0, len(history)-1, 2)]
|
70 |
+
return history, response
|
71 |
|
72 |
import gradio as gr
|
73 |
|