Hetfield08 commited on
Commit
369f74e
·
verified ·
1 Parent(s): efbe06e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -35,10 +35,10 @@ def answer_nfl_question_tool(question: str ) -> str:
35
  """
36
 
37
  # Prepare the duckduckgo query
38
- query = f"{question}"
39
- print(f"🔍 Searching DuckDuckGo with query: {query}") # Debug
40
  with DDGS() as ddgs:
41
- search_results = list(ddgs.text(query, max_results=5)) # Otteniamo i primi 5 risultati
42
 
43
  print(f"📊 Found {len(search_results)} results") # Debug
44
 
@@ -62,7 +62,7 @@ def answer_nfl_question_tool(question: str ) -> str:
62
 
63
  visit_webpage_tool = VisitWebpageTool()
64
 
65
- for i, url in enumerate(urls[:num_pages_to_visit], 1):
66
  try:
67
  page_content = visit_webpage_tool.forward(url)
68
  detailed_results.append(f"\nSource {i}: {url}\n")
 
35
  """
36
 
37
  # Prepare the duckduckgo query
38
+ search_query = f"{question}"
39
+ print(f"🔍 Searching DuckDuckGo with query: {search_query}") # Debug
40
  with DDGS() as ddgs:
41
+ search_results = list(ddgs.text(search_query, max_results=3)) # Otteniamo i primi 5 risultati
42
 
43
  print(f"📊 Found {len(search_results)} results") # Debug
44
 
 
62
 
63
  visit_webpage_tool = VisitWebpageTool()
64
 
65
+ for i, url in enumerate(urls[:3], 1):
66
  try:
67
  page_content = visit_webpage_tool.forward(url)
68
  detailed_results.append(f"\nSource {i}: {url}\n")