Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,9 @@ def random_response(message, history):
|
|
15 |
api_name="/chat"
|
16 |
)
|
17 |
|
18 |
-
#
|
19 |
-
history.append((message, result)) #
|
20 |
-
return result, history # Return
|
21 |
|
22 |
# Set up Gradio chat interface
|
23 |
demo = gr.ChatInterface(
|
|
|
15 |
api_name="/chat"
|
16 |
)
|
17 |
|
18 |
+
# Append the new message and result to history
|
19 |
+
history.append((message, result)) # Ensure the history is a list of tuples
|
20 |
+
return result, history # Return both response and updated history
|
21 |
|
22 |
# Set up Gradio chat interface
|
23 |
demo = gr.ChatInterface(
|