Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import pandas as pd
|
| 5 |
|
| 6 |
from smolagents import CodeAgent, OpenAIServerModel
|
| 7 |
-
from tools import search_tool, visit_webpage, wiki_tool
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
@@ -32,10 +32,10 @@ class AdvancedAgent:
|
|
| 32 |
)
|
| 33 |
|
| 34 |
self.ferdinand = CodeAgent(
|
| 35 |
-
tools=[search_tool, visit_webpage, wiki_tool],
|
| 36 |
model=model,
|
| 37 |
add_base_tools=True, # Add any additional base tools
|
| 38 |
-
planning_interval=3 # Enable planning every 3 steps
|
| 39 |
)
|
| 40 |
|
| 41 |
def __call__(self, question: str) -> str:
|
|
|
|
| 4 |
import pandas as pd
|
| 5 |
|
| 6 |
from smolagents import CodeAgent, OpenAIServerModel
|
| 7 |
+
from tools import search_tool, visit_webpage, wiki_tool, read_any_file
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
self.ferdinand = CodeAgent(
|
| 35 |
+
tools=[search_tool, visit_webpage, wiki_tool, read_any_file],
|
| 36 |
model=model,
|
| 37 |
add_base_tools=True, # Add any additional base tools
|
| 38 |
+
planning_interval=3, # Enable planning every 3 steps
|
| 39 |
)
|
| 40 |
|
| 41 |
def __call__(self, question: str) -> str:
|