Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
|
|
| 1 |
from smolagents import CodeAgent, InferenceClientModel
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
# Initialize
|
| 4 |
model = InferenceClientModel()
|
| 5 |
|
| 6 |
-
#
|
|
|
|
|
|
|
|
|
|
| 7 |
alfred = CodeAgent(
|
| 8 |
-
tools=
|
| 9 |
model=model
|
| 10 |
)
|
| 11 |
|
| 12 |
-
|
| 13 |
-
response = alfred.run("What is Facebook and what's their most popular model?")
|
| 14 |
-
|
| 15 |
-
print("🎩 Alfred's Response:")
|
| 16 |
-
print(response)
|
|
|
|
| 1 |
+
# app.py - CORRECT
|
| 2 |
from smolagents import CodeAgent, InferenceClientModel
|
| 3 |
+
from retriever import guest_info_tool # Main RAG tool
|
| 4 |
+
from tools import all_tools # Import the list that contains all tools
|
| 5 |
|
| 6 |
+
# Initialize model
|
| 7 |
model = InferenceClientModel()
|
| 8 |
|
| 9 |
+
# Combine main RAG tool with all auxiliary tools
|
| 10 |
+
all_agent_tools = [guest_info_tool] + all_tools
|
| 11 |
+
|
| 12 |
+
# Create agent with ALL tools
|
| 13 |
alfred = CodeAgent(
|
| 14 |
+
tools=all_agent_tools, # ✅ Now includes web_search_tool, weather_info_tool, hub_stats_tool
|
| 15 |
model=model
|
| 16 |
)
|
| 17 |
|
| 18 |
+
print(f"✅ Alfred created with {len(all_agent_tools)} tools")
|
|
|
|
|
|
|
|
|
|
|
|