Update app.py
Browse files
app.py
CHANGED
|
@@ -257,16 +257,6 @@ def demo():
|
|
| 257 |
|
| 258 |
|
| 259 |
chatbot = gr.Chatbot(height=300)
|
| 260 |
-
with gr.Accordion("Advanced - Document references", open=False):
|
| 261 |
-
with gr.Row():
|
| 262 |
-
doc_source1 = gr.Textbox(label="Reference 1", lines=2, container=True, scale=20)
|
| 263 |
-
source1_page = gr.Number(label="Page", scale=1)
|
| 264 |
-
with gr.Row():
|
| 265 |
-
doc_source2 = gr.Textbox(label="Reference 2", lines=2, container=True, scale=20)
|
| 266 |
-
source2_page = gr.Number(label="Page", scale=1)
|
| 267 |
-
with gr.Row():
|
| 268 |
-
doc_source3 = gr.Textbox(label="Reference 3", lines=2, container=True, scale=20)
|
| 269 |
-
source3_page = gr.Number(label="Page", scale=1)
|
| 270 |
with gr.Row():
|
| 271 |
msg = gr.Textbox(placeholder="Type message", container=True)
|
| 272 |
with gr.Row():
|
|
@@ -277,6 +267,18 @@ def demo():
|
|
| 277 |
llm_progress = gr.Textbox(value="None",label="QA chain initialization", visible=True)
|
| 278 |
with gr.Row():
|
| 279 |
qachain_btn = gr.Button("Initialize question-answering chain...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
with gr.Row():
|
| 281 |
submit_btn = gr.Button("Submit")
|
| 282 |
clear_btn = gr.ClearButton([msg, chatbot])
|
|
|
|
| 257 |
|
| 258 |
|
| 259 |
chatbot = gr.Chatbot(height=300)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
with gr.Row():
|
| 261 |
msg = gr.Textbox(placeholder="Type message", container=True)
|
| 262 |
with gr.Row():
|
|
|
|
| 267 |
llm_progress = gr.Textbox(value="None",label="QA chain initialization", visible=True)
|
| 268 |
with gr.Row():
|
| 269 |
qachain_btn = gr.Button("Initialize question-answering chain...")
|
| 270 |
+
|
| 271 |
+
with gr.Accordion("References", open=False):
|
| 272 |
+
with gr.Row():
|
| 273 |
+
doc_source1 = gr.Textbox(label="Reference 1", lines=2, container=True, scale=20)
|
| 274 |
+
source1_page = gr.Number(label="Page", scale=1)
|
| 275 |
+
with gr.Row():
|
| 276 |
+
doc_source2 = gr.Textbox(label="Reference 2", lines=2, container=True, scale=20)
|
| 277 |
+
source2_page = gr.Number(label="Page", scale=1)
|
| 278 |
+
with gr.Row():
|
| 279 |
+
doc_source3 = gr.Textbox(label="Reference 3", lines=2, container=True, scale=20)
|
| 280 |
+
source3_page = gr.Number(label="Page", scale=1)
|
| 281 |
+
|
| 282 |
with gr.Row():
|
| 283 |
submit_btn = gr.Button("Submit")
|
| 284 |
clear_btn = gr.ClearButton([msg, chatbot])
|