TejAndrewsACC commited on
Commit
2310cf9
·
verified ·
1 Parent(s): 618e43b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,9 +15,9 @@ def random_response(message, history):
15
  api_name="/chat"
16
  )
17
 
18
- # Return the response and updated history
19
- history.append((message, result)) # Append the current message and response to history
20
- return result, history # Return the response and history as separate outputs
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(