Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -427,13 +427,17 @@ def build_ui():
|
|
427 |
with gr.Row():
|
428 |
with gr.Column(scale=1):
|
429 |
query_box = gr.Textbox(placeholder="Enter your question…", label="Query", lines=4)
|
430 |
-
k_slider = gr.Slider(minimum=1, maximum=
|
431 |
search_button = gr.Button("🔍 Search", variant="primary")
|
|
|
|
|
432 |
with gr.Column(scale=2):
|
433 |
output_text = gr.Textbox(label="Indices (0-based)", lines=12, placeholder="[0, 1, 2, ...]")
|
|
|
434 |
|
435 |
|
436 |
search_button.click(search, inputs=[query_box, k_slider], outputs=[output_text])
|
|
|
437 |
|
438 |
with gr.Tab("3) Agent (Streaming)"):
|
439 |
with gr.Row(equal_height=True):
|
|
|
427 |
with gr.Row():
|
428 |
with gr.Column(scale=1):
|
429 |
query_box = gr.Textbox(placeholder="Enter your question…", label="Query", lines=4)
|
430 |
+
k_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results (k)", value=5)
|
431 |
search_button = gr.Button("🔍 Search", variant="primary")
|
432 |
+
get_pages_button = gr.Button("🔍 Get Pages", variant="primary")
|
433 |
+
|
434 |
with gr.Column(scale=2):
|
435 |
output_text = gr.Textbox(label="Indices (0-based)", lines=12, placeholder="[0, 1, 2, ...]")
|
436 |
+
output_payload = gr.Textbox(label="Indices (0-based)", lines=12, placeholder="[0, 1, 2, ...]")
|
437 |
|
438 |
|
439 |
search_button.click(search, inputs=[query_box, k_slider], outputs=[output_text])
|
440 |
+
get_pages_button.click(get_pages, inputs=[output_text], outputs=[output_payload])
|
441 |
|
442 |
with gr.Tab("3) Agent (Streaming)"):
|
443 |
with gr.Row(equal_height=True):
|