qwikQ8 commited on
Commit
94f1546
·
verified ·
1 Parent(s): dc6e429

Update app.py

Browse files

Changed DuckDuckGoTool call

Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -51,7 +51,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
51
  ## My Stuff 2
52
  ###############
53
 
54
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool, Tool, InferenceClientModel
55
  import datetime
56
  import requests
57
  import pytz
@@ -88,10 +88,10 @@ def get_current_time_in_timezone(timezone: str) -> str:
88
 
89
 
90
  # Initialize the final answer tool
91
- final_answer = FinalAnswerTool()
92
 
93
  # Initialize the web search tool
94
- search_tool = DuckDuckGoSearchTool()
95
 
96
  ## Initialize the weather tool
97
  #weather_info_tool = WeatherInfoTool()
@@ -138,15 +138,15 @@ agent = CodeAgent(
138
 
139
  #######
140
 
141
- # from smolagents import DuckDuckGoSearchTool
142
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
143
 
144
- # Initialize the DuckDuckGo search tool
145
- search_tool = DuckDuckGoSearchTool()
146
 
147
- # Example usage
148
- results = search_tool("Who's the current President of France?")
149
- # print(results)
150
 
151
  #agent.run(
152
  # "Why does Mike not know many people in New York?",
 
51
  ## My Stuff 2
52
  ###############
53
 
54
+ from smolagents import CodeAgent, HfApiModel, load_tool, tool, Tool, InferenceClientModel, DuckDuckGoSearchTool,
55
  import datetime
56
  import requests
57
  import pytz
 
88
 
89
 
90
  # Initialize the final answer tool
91
+ # final_answer = FinalAnswerTool()
92
 
93
  # Initialize the web search tool
94
+ # search_tool = DuckDuckGoSearchTool()
95
 
96
  ## Initialize the weather tool
97
  #weather_info_tool = WeatherInfoTool()
 
138
 
139
  #######
140
 
141
+ # # from smolagents import DuckDuckGoSearchTool
142
+ # from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
143
 
144
+ # # Initialize the DuckDuckGo search tool
145
+ # search_tool = DuckDuckGoSearchTool()
146
 
147
+ # # Example usage
148
+ # results = search_tool("Who's the current President of France?")
149
+ # # print(results)
150
 
151
  #agent.run(
152
  # "Why does Mike not know many people in New York?",