Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ with gr.Blocks() as demo:
|
|
51 |
|
52 |
clear = gr.Button("Clear")
|
53 |
|
54 |
-
def respond(
|
55 |
|
56 |
index = load_index_from_storage(storage_context)
|
57 |
query_engine = index.as_query_engine(similarity_top_k=3)
|
@@ -63,8 +63,8 @@ with gr.Blocks() as demo:
|
|
63 |
time.sleep(1)
|
64 |
return "", chat_history
|
65 |
|
66 |
-
msg.submit(respond, [
|
67 |
-
btn2.click(respond, [
|
68 |
clear.click(lambda: None, None, chatbot, queue=False)
|
69 |
|
70 |
if __name__ == "__main__":
|
|
|
51 |
|
52 |
clear = gr.Button("Clear")
|
53 |
|
54 |
+
def respond(message, chat_history):
|
55 |
|
56 |
index = load_index_from_storage(storage_context)
|
57 |
query_engine = index.as_query_engine(similarity_top_k=3)
|
|
|
63 |
time.sleep(1)
|
64 |
return "", chat_history
|
65 |
|
66 |
+
msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
67 |
+
btn2.click(respond, [msg, chatbot], [msg, chatbot])
|
68 |
clear.click(lambda: None, None, chatbot, queue=False)
|
69 |
|
70 |
if __name__ == "__main__":
|