Ankit7rma commited on
Commit
e314d0e
·
verified ·
1 Parent(s): accafda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -33,11 +33,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
- search_tool = DuckDuckGoSearchTool(
37
- name="web_search",
38
- description="Use this tool to search the web for up-to-date information."
39
- )
40
 
 
 
 
 
41
  final_answer = FinalAnswerTool()
42
 
43
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
 
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
+ web_search = DuckDuckGoSearchTool()
 
 
 
37
 
38
+ @tool
39
+ def web_search(query: str) -> str:
40
+ """Search the web using DuckDuckGo."""
41
+ return DuckDuckGoSearchTool()(query)
42
  final_answer = FinalAnswerTool()
43
 
44
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder: