Spaces:
Runtime error
Runtime error
srinivas-mushroom
commited on
Commit
•
003fa24
1
Parent(s):
bc6527c
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,10 @@ def chatbot(text):
|
|
16 |
|
17 |
def gradio_interface(prompt, history=[]):
|
18 |
output = chatbot(prompt)
|
19 |
-
history
|
|
|
|
|
|
|
20 |
return history, history
|
21 |
|
22 |
gr.Interface(fn = gradio_interface,
|
|
|
16 |
|
17 |
def gradio_interface(prompt, history=[]):
|
18 |
output = chatbot(prompt)
|
19 |
+
if history != []:
|
20 |
+
history.append((prompt,output)).reverse()
|
21 |
+
else:
|
22 |
+
history.append((prompt, output))
|
23 |
return history, history
|
24 |
|
25 |
gr.Interface(fn = gradio_interface,
|