TejAndrewsACC commited on
Commit
618e43b
·
verified ·
1 Parent(s): 3a1d0f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,7 +16,8 @@ def random_response(message, history):
16
  )
17
 
18
  # Return the response and updated history
19
- return result, history + [(message, result)] # Append the current message and response to history
 
20
 
21
  # Set up Gradio chat interface
22
  demo = gr.ChatInterface(
 
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(