Spaces:
Sleeping
Sleeping
File size: 1,086 Bytes
25a3b4b 7845350 25a3b4b ed20377 25a3b4b ed20377 9faf105 25a3b4b 9faf105 25a3b4b 9faf105 25a3b4b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | import os
from smolagents.utils import encode_image_base64, make_image_url
from smolagents import OpenAIServerModel, CodeAgent, InferenceClientModel
import app_agents.web_agent as web_agent
import app_tools.text_inspector
import app_tools.visual_qa
manager_agent = CodeAgent(
model=InferenceClientModel("deepseek-ai/DeepSeek-R1", provider="together", max_tokens=8096),
tools=[app_tools.text_inspector.TextInspectorTool(), app_tools.visual_qa.VisualQATool()],
planning_interval=4,
verbosity_level=2,
managed_agents=[web_agent.web_agent],
max_steps=10,
# grammar=DEFAULT_CODEAGENT_REGEX_GRAMMAR,
additional_authorized_imports=[
"requests",
"zipfile",
"os",
"pandas",
"numpy",
"sympy",
"json",
"bs4",
"pubchempy",
"xml",
"yahoo_finance",
"Bio",
"sklearn",
"scipy",
"pydub",
"io",
"PIL",
"chess",
"PyPDF2",
"pptx",
"torch",
"datetime",
"csv",
"fractions",
],
) |