Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -428,7 +428,8 @@ demo = gr.ChatInterface(
|
|
428 |
gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[0]),
|
429 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
|
430 |
gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
|
431 |
-
use_web_search
|
|
|
432 |
],
|
433 |
title="AI-powered Web Search and PDF Chat Assistant",
|
434 |
description="Chat with your PDFs or use web search to answer questions.",
|
@@ -467,8 +468,7 @@ with demo:
|
|
467 |
with gr.Row():
|
468 |
file_input = gr.Files(label="Upload your PDF documents", file_types=[".pdf"])
|
469 |
parser_dropdown = gr.Dropdown(choices=["pypdf", "llamaparse"], label="Select PDF Parser", value="llamaparse")
|
470 |
-
update_button = gr.Button("Upload Document")
|
471 |
-
document_selector
|
472 |
|
473 |
update_output = gr.Textbox(label="Update Status")
|
474 |
update_button.click(update_vectors, inputs=[file_input, parser_dropdown], outputs=update_output)
|
|
|
428 |
gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[0]),
|
429 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
|
430 |
gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
|
431 |
+
use_web_search,
|
432 |
+
document_selector
|
433 |
],
|
434 |
title="AI-powered Web Search and PDF Chat Assistant",
|
435 |
description="Chat with your PDFs or use web search to answer questions.",
|
|
|
468 |
with gr.Row():
|
469 |
file_input = gr.Files(label="Upload your PDF documents", file_types=[".pdf"])
|
470 |
parser_dropdown = gr.Dropdown(choices=["pypdf", "llamaparse"], label="Select PDF Parser", value="llamaparse")
|
471 |
+
update_button = gr.Button("Upload Document")
|
|
|
472 |
|
473 |
update_output = gr.Textbox(label="Update Status")
|
474 |
update_button.click(update_vectors, inputs=[file_input, parser_dropdown], outputs=update_output)
|