Shreyas094 commited on
Commit
2ba7837
·
verified ·
1 Parent(s): edeeb18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -479,18 +479,18 @@ def display_documents():
479
  # Define the checkbox outside the demo block
480
  document_selector = gr.CheckboxGroup(label="Select documents to query")
481
  use_web_search = gr.Checkbox(label="Use Web Search", value=True)
482
- use_web_search
483
  demo = gr.Blocks()
484
 
485
  with demo:
486
  chatbot = gr.ChatInterface(
487
  respond,
488
- additional_inputs=[
489
  gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[3]),
490
  gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
491
  gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
492
- document_selector # Add the document selector to the chat interface
493
-
494
  ],
495
  title="AI-powered Web Search and PDF Chat Assistant",
496
  description="Chat with your PDFs or use web search to answer questions",
 
479
  # Define the checkbox outside the demo block
480
  document_selector = gr.CheckboxGroup(label="Select documents to query")
481
  use_web_search = gr.Checkbox(label="Use Web Search", value=True)
482
+
483
  demo = gr.Blocks()
484
 
485
  with demo:
486
  chatbot = gr.ChatInterface(
487
  respond,
488
+ web_search=[
489
  gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[3]),
490
  gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
491
  gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
492
+ document_selector, # Add the document selector to the chat interface
493
+ use_web_search
494
  ],
495
  title="AI-powered Web Search and PDF Chat Assistant",
496
  description="Chat with your PDFs or use web search to answer questions",