patti-j commited on
Commit
631b69f
1 Parent(s): 9907006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,7 +5,6 @@ from query_data import get_chain
5
 
6
 
7
  # Execute the chat functionality.
8
- output = get_chain({"message": message, "chat_history": history})["response"]
9
 
10
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
11
 
@@ -21,10 +20,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
21
  response = gr.Textbox
22
 
23
  def respond(message, chat_history):
24
- response = output
25
- chat_history.append((message, response))
26
- return "", chat_history
27
-
 
28
  with gr.Row():
29
  send = gr.Button(value="Send").style(full_width=False)
30
  clear = gr.Button(value="Clear Chat").style(full_width=False)
 
5
 
6
 
7
  # Execute the chat functionality.
 
8
 
9
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
10
 
 
20
  response = gr.Textbox
21
 
22
  def respond(message, chat_history):
23
+ response = get_chain({"message": message, "chat_history": history})["response"]
24
+ history.append((message, response))
25
+ return "", history
26
+
27
+
28
  with gr.Row():
29
  send = gr.Button(value="Send").style(full_width=False)
30
  clear = gr.Button(value="Clear Chat").style(full_width=False)