Update app.py
Browse files
app.py
CHANGED
|
@@ -164,17 +164,18 @@ def demo():
|
|
| 164 |
with gr.Row():
|
| 165 |
msg = gr.Textbox(placeholder="Type message", container=True)
|
| 166 |
with gr.Row():
|
| 167 |
-
db_btn = gr.Button('Initialize database')
|
| 168 |
qachain_btn = gr.Button('Start chatbot')
|
| 169 |
submit_btn = gr.Button("Submit")
|
| 170 |
clear_btn = gr.ClearButton([msg, chatbot])
|
| 171 |
|
| 172 |
-
document = list_file_obj
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
|
|
|
| 178 |
|
| 179 |
qachain_btn.click(initialize_LLM, \
|
| 180 |
inputs=[vector_db], \
|
|
|
|
| 164 |
with gr.Row():
|
| 165 |
msg = gr.Textbox(placeholder="Type message", container=True)
|
| 166 |
with gr.Row():
|
| 167 |
+
#db_btn = gr.Button('Initialize database')
|
| 168 |
qachain_btn = gr.Button('Start chatbot')
|
| 169 |
submit_btn = gr.Button("Submit")
|
| 170 |
clear_btn = gr.ClearButton([msg, chatbot])
|
| 171 |
|
| 172 |
+
# document = list_file_obj
|
| 173 |
+
vector_db, collection_name = initialize_database(list_file_obj)
|
| 174 |
+
|
| 175 |
+
# #upload_btn.upload(upload_file, inputs=[upload_btn], outputs=[document])
|
| 176 |
+
# db_btn.click(initialize_database, \
|
| 177 |
+
# inputs=[document], \
|
| 178 |
+
# outputs=[vector_db, collection_name])
|
| 179 |
|
| 180 |
qachain_btn.click(initialize_LLM, \
|
| 181 |
inputs=[vector_db], \
|