samih-7 commited on
Commit
8c6f6cb
·
verified ·
1 Parent(s): 031af50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -7,13 +7,16 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
 
 
10
  @tool
11
  def search_web(query:str)-> str:
12
  """A tool that runs a DuckDuckGo search and returns a formatted result.
13
  Args:
14
  query: A string representing the query to search for.
15
  """
16
- return DuckDuckGoSearchTool(query)
 
17
 
18
  @tool
19
  def get_current_time_in_timezone(timezone: str) -> str:
 
7
 
8
  from Gradio_UI import GradioUI
9
 
10
+ ddg = DuckDuckGoSearchTool(max_results=5)
11
+
12
  @tool
13
  def search_web(query:str)-> str:
14
  """A tool that runs a DuckDuckGo search and returns a formatted result.
15
  Args:
16
  query: A string representing the query to search for.
17
  """
18
+ results = ddg.run(query)
19
+ return results
20
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str: