Shreyas094 commited on
Commit
3449685
1 Parent(s): 6d2edac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -273,7 +273,7 @@ def generate_chunked_response(prompt, model, max_tokens=10000, num_calls=3, temp
273
 
274
  def duckduckgo_search(query):
275
  with DDGS() as ddgs:
276
- results = ddgs.text(query, max_results=5)
277
  return results
278
 
279
  class CitingSources(BaseModel):
@@ -376,7 +376,7 @@ def get_context_for_summary(selected_docs):
376
  embed = get_embeddings()
377
  if os.path.exists("faiss_database"):
378
  database = FAISS.load_local("faiss_database", embed, allow_dangerous_deserialization=True)
379
- retriever = database.as_retriever(search_kwargs={"k": 5}) # Retrieve top 5 most relevant chunks
380
 
381
  # Create a generic query that covers common financial summary topics
382
  generic_query = "financial performance revenue profit assets liabilities cash flow key metrics highlights"
 
273
 
274
  def duckduckgo_search(query):
275
  with DDGS() as ddgs:
276
+ results = ddgs.text(query, max_results=10)
277
  return results
278
 
279
  class CitingSources(BaseModel):
 
376
  embed = get_embeddings()
377
  if os.path.exists("faiss_database"):
378
  database = FAISS.load_local("faiss_database", embed, allow_dangerous_deserialization=True)
379
+ retriever = database.as_retriever(search_kwargs={"k": 10}) # Retrieve top 5 most relevant chunks
380
 
381
  # Create a generic query that covers common financial summary topics
382
  generic_query = "financial performance revenue profit assets liabilities cash flow key metrics highlights"