Update app.py
Browse files
app.py
CHANGED
|
@@ -151,23 +151,23 @@ def demo():
|
|
| 151 |
collection_name = gr.State()
|
| 152 |
|
| 153 |
chatbot = gr.Chatbot(height=300)
|
| 154 |
-
with gr.Accordion("
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
|
| 172 |
document = list_file_obj
|
| 173 |
|
|
@@ -198,3 +198,5 @@ def demo():
|
|
| 198 |
queue=False)
|
| 199 |
demo.queue().launch(debug=True)
|
| 200 |
|
|
|
|
|
|
|
|
|
| 151 |
collection_name = gr.State()
|
| 152 |
|
| 153 |
chatbot = gr.Chatbot(height=300)
|
| 154 |
+
with gr.Accordion("References", open=True):
|
| 155 |
+
with gr.Row():
|
| 156 |
+
doc_source1 = gr.Textbox(label="Reference 1", lines=5, container=True, scale=20)
|
| 157 |
+
source1_page = gr.Number(label="Page", scale=1)
|
| 158 |
+
with gr.Row():
|
| 159 |
+
doc_source2 = gr.Textbox(label="Reference 2", lines=5, container=True, scale=20)
|
| 160 |
+
source2_page = gr.Number(label="Page", scale=1)
|
| 161 |
+
with gr.Row():
|
| 162 |
+
doc_source3 = gr.Textbox(label="Reference 3", lines=5, container=True, scale=20)
|
| 163 |
+
source3_page = gr.Number(label="Page", scale=1)
|
| 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 |
|
|
|
|
| 198 |
queue=False)
|
| 199 |
demo.queue().launch(debug=True)
|
| 200 |
|
| 201 |
+
if __name__ == "__main__":
|
| 202 |
+
demo()
|