Vaib9 commited on
Commit
8eb6bcd
·
verified ·
1 Parent(s): 697f446

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,7 +10,7 @@ from Gradio_UI import GradioUI
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
 
12
  @tool
13
- def web_search_tool(search_text:str)-> str: #it's import to specify the return type
14
  # Keep this format for the description / args / args description but feel free to modify the tool
15
  """A tool that takes user's query and performs a web search on it.
16
  Args:
@@ -18,10 +18,10 @@ def web_search_tool(search_text:str)-> str: #it's import to specify the return t
18
  """
19
  try:
20
  # Create a search object
21
- query = DuckDuckGoSearchTool(search_text)
22
- return f"The result for your search query is {query}."
23
  except Exception as e:
24
- return f"Error fetching the search query text."
25
 
26
  @tool
27
  def get_current_time_in_timezone(timezone: str) -> str:
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
 
12
  @tool
13
+ def web_search_tool(query:str)-> str: #it's import to specify the return type
14
  # Keep this format for the description / args / args description but feel free to modify the tool
15
  """A tool that takes user's query and performs a web search on it.
16
  Args:
 
18
  """
19
  try:
20
  # Create a search object
21
+ answer = DuckDuckGoSearchTool(query)
22
+ return answer
23
  except Exception as e:
24
+ return f"Error fetching the search query."
25
 
26
  @tool
27
  def get_current_time_in_timezone(timezone: str) -> str: