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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -15,8 +15,11 @@ def search_web(query:str)-> str:
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:
 
15
  Args:
16
  query: A string representing the query to search for.
17
  """
18
+ try:
19
+ results = ddg(query)
20
+ return results
21
+ except Exception as e:
22
+ return f"Error while searching: {str(e)}"
23
 
24
  @tool
25
  def get_current_time_in_timezone(timezone: str) -> str: