Spaces:
Running
Running
Update ui/gradio_ui.py
Browse files- ui/gradio_ui.py +15 -20
ui/gradio_ui.py
CHANGED
@@ -60,29 +60,24 @@ def ui():
|
|
60 |
#db_btn.click(initialize_database, \
|
61 |
#inputs=[document], \
|
62 |
#outputs=[vector_db, db_progress])
|
63 |
-
qachain_btn.click(initializer,
|
64 |
-
inputs=[document, slider_temperature, slider_maxtokens, slider_topk, thold],
|
65 |
-
outputs=[qa_chain, llm_progress]).then(lambda:[None,"",0,"",0,"",0],
|
66 |
-
inputs=None,
|
67 |
-
outputs=[chatbot],
|
68 |
queue=False)
|
69 |
|
70 |
# Chatbot events
|
71 |
-
msg.submit(conversation,
|
72 |
-
inputs=[qa_chain, msg, chatbot],
|
73 |
-
outputs=[qa_chain, msg, chatbot],
|
74 |
queue=False)
|
75 |
-
submit_btn.click(conversation,
|
76 |
-
inputs=[qa_chain, msg, chatbot],
|
77 |
-
outputs=[qa_chain, msg, chatbot],
|
78 |
queue=False)
|
79 |
-
clear_btn.click(lambda:[None,"",0,"",0,"",0],
|
80 |
-
inputs=None,
|
81 |
-
outputs=[chatbot],
|
82 |
queue=False)
|
83 |
-
ui.queue().launch(debug=True)
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
60 |
#db_btn.click(initialize_database, \
|
61 |
#inputs=[document], \
|
62 |
#outputs=[vector_db, db_progress])
|
63 |
+
qachain_btn.click(initializer,
|
64 |
+
inputs=[document, slider_temperature, slider_maxtokens, slider_topk, thold],
|
65 |
+
outputs=[qa_chain, llm_progress]).then(lambda:[None,"",0,"",0,"",0],
|
66 |
+
inputs=None,
|
67 |
+
outputs=[chatbot],
|
68 |
queue=False)
|
69 |
|
70 |
# Chatbot events
|
71 |
+
msg.submit(conversation,
|
72 |
+
inputs=[qa_chain, msg, chatbot],
|
73 |
+
outputs=[qa_chain, msg, chatbot],
|
74 |
queue=False)
|
75 |
+
submit_btn.click(conversation,
|
76 |
+
inputs=[qa_chain, msg, chatbot],
|
77 |
+
outputs=[qa_chain, msg, chatbot],
|
78 |
queue=False)
|
79 |
+
clear_btn.click(lambda:[None,"",0,"",0,"",0],
|
80 |
+
inputs=None,
|
81 |
+
outputs=[chatbot],
|
82 |
queue=False)
|
83 |
+
ui.queue().launch(debug=True)
|
|
|
|
|
|
|
|
|
|