Arno' Francesco (GDS DS&G) commited on
Commit
27c30b4
·
1 Parent(s): 8c280f1

update app

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import random
3
  from smolagents import GradioUI, CodeAgent, HfApiModel
4
 
5
  # Import our custom tools from their modules
6
- from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
7
  from retriever import load_guest_dataset
8
 
9
  # Initialize the Hugging Face model
@@ -21,9 +21,18 @@ hub_stats_tool = HubStatsTool()
21
  # Load the guest dataset and initialize the guest info tool
22
  guest_info_tool = load_guest_dataset()
23
 
 
 
 
24
  # Create Alfred with all the tools
25
  alfred = CodeAgent(
26
- tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool],
 
 
 
 
 
 
27
  model=model,
28
  add_base_tools=True, # Add any additional base tools
29
  planning_interval=3 # Enable planning every 3 steps
 
3
  from smolagents import GradioUI, CodeAgent, HfApiModel
4
 
5
  # Import our custom tools from their modules
6
+ from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool, LatestNewsTool
7
  from retriever import load_guest_dataset
8
 
9
  # Initialize the Hugging Face model
 
21
  # Load the guest dataset and initialize the guest info tool
22
  guest_info_tool = load_guest_dataset()
23
 
24
+ # initialize the latest news tool
25
+ latest_news_tool = LatestNewsTool()
26
+
27
  # Create Alfred with all the tools
28
  alfred = CodeAgent(
29
+ tools=[
30
+ guest_info_tool,
31
+ weather_info_tool,
32
+ hub_stats_tool,
33
+ search_tool,
34
+ latest_news_tool
35
+ ],
36
  model=model,
37
  add_base_tools=True, # Add any additional base tools
38
  planning_interval=3 # Enable planning every 3 steps