Shreyas094 commited on
Commit
e0bce44
·
verified ·
1 Parent(s): f9e7dcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -396,7 +396,7 @@ def summarize_web_results(query: str, search_results: List[Dict[str, str]], conv
396
  return f"An error occurred during summarization: {str(e)}"
397
 
398
  # Modify the existing respond function to handle both PDF and web search
399
- def respond(message, history, model, temperature, num_calls, selected_docs, use_web_search):
400
  logging.info(f"User Query: {message}")
401
  logging.info(f"Model Used: {model}")
402
  logging.info(f"Selected Documents: {selected_docs}")
@@ -659,8 +659,8 @@ demo = gr.ChatInterface(
659
  gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[3]),
660
  gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
661
  gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
662
- gr.CheckboxGroup(label="Select documents to query", choices=[]),
663
- gr.Checkbox(label="Use Web Search", value=True)
664
  ],
665
  title="AI-powered PDF Chat and Web Search Assistant",
666
  description="Chat with your PDFs or use web search to answer questions.",
 
396
  return f"An error occurred during summarization: {str(e)}"
397
 
398
  # Modify the existing respond function to handle both PDF and web search
399
+ def respond(message, history, model, temperature, num_calls, use_web_search, selected_docs):
400
  logging.info(f"User Query: {message}")
401
  logging.info(f"Model Used: {model}")
402
  logging.info(f"Selected Documents: {selected_docs}")
 
659
  gr.Dropdown(choices=MODELS, label="Select Model", value=MODELS[3]),
660
  gr.Slider(minimum=0.1, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
661
  gr.Slider(minimum=1, maximum=5, value=1, step=1, label="Number of API Calls"),
662
+ gr.Checkbox(label="Use Web Search", value=True),
663
+ gr.CheckboxGroup(label="Select documents to query")
664
  ],
665
  title="AI-powered PDF Chat and Web Search Assistant",
666
  description="Chat with your PDFs or use web search to answer questions.",