Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,8 @@ from smolagents import GradioUI, CodeAgent, HfApiModel
|
|
| 6 |
from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
|
| 7 |
from retriever import load_guest_dataset
|
| 8 |
|
|
|
|
|
|
|
| 9 |
# Initialize the Hugging Face model
|
| 10 |
model = HfApiModel()
|
| 11 |
|
|
@@ -21,9 +23,11 @@ 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
|
|
|
|
| 6 |
from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
|
| 7 |
from retriever import load_guest_dataset
|
| 8 |
|
| 9 |
+
from tools import CountryLanguageTool
|
| 10 |
+
|
| 11 |
# Initialize the Hugging Face model
|
| 12 |
model = HfApiModel()
|
| 13 |
|
|
|
|
| 23 |
# Load the guest dataset and initialize the guest info tool
|
| 24 |
guest_info_tool = load_guest_dataset()
|
| 25 |
|
| 26 |
+
country_language_tool = CountryLanguageTool()
|
| 27 |
+
|
| 28 |
# Create Alfred with all the tools
|
| 29 |
alfred = CodeAgent(
|
| 30 |
+
tools=[guest_info_tool, weather_info_tool, hub_stats_tool, search_tool, country_language_tool],
|
| 31 |
model=model,
|
| 32 |
add_base_tools=True, # Add any additional base tools
|
| 33 |
planning_interval=3 # Enable planning every 3 steps
|