Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
25 |
-
|
26 |
-
return "",
|
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)
|