Spaces:
Sleeping
Sleeping
Upload tool
Browse filesFiles changed (4)
- agent.json+7-7
- app.py+6-1
- requirements.txt+2-2
- tools/visit_webpage.py+1-1
34 unmodified lines35363738394041384339454041424344454649474849505134 unmodified lines "name": null, "description": null, "authorized_imports": [ "time", "unicodedata", "statistics", "re", "datetime", "random", "pandas", "collections", "math", "statistics", "queue", "collections", "itertools", "re", "time", "stat" "stat", "random", "unicodedata" ]}1234511 unmodified lines171819202122232425263 unmodified lines3031322833343536
import yamlfrom smolagents import GradioUI, CodeAgent, HfApiModel
from tools.web_search import DuckDuckGoSearchTool11 unmodified linesfinal_answer = FinalAnswerTool()
prompt_templates = yaml.safe_load( importlib.resources.files("smolagents.prompts").joinpath("code_agent.yaml").read_text())
agent = CodeAgent( model=model, tools=[web_search, visit_webpage, final_answer],3 unmodified lines planning_interval=None, name=None, description=None, prompts_path='./prompts.yaml' prompt_templates=prompt_templates)
GradioUI(agent).launch()1223455duckduckgo_searchmarkdownifyrequestspandasmarkdownifysmolagentsrequests123445678from typing import Any, Optionalfrom smolagents.tools import Toolimport markdownifyimport smolagentsimport requestsimport smolagents
class VisitWebpageTool(Tool): name = "visit_webpage"agent.json+7-7
app.py+6-1
requirements.txt+2-2
tools/visit_webpage.py+1-1