| from smolagents import CodeAgent, HfApiModel |
| from tools.gaia_tool import GaiaTool |
| from tools.final_answer import FinalAnswerTool |
| from tools.python_interpreter import PythonInterpreterTool |
| from Gradio_UI import GradioUI |
|
|
| |
| model = HfApiModel( |
| model_id="Qwen/Qwen2.5-Coder-32B-Instruct", |
| max_tokens=2048, |
| temperature=0.3, |
| ) |
|
|
| |
| agent = CodeAgent( |
| model=model, |
| tools=[ |
| GaiaTool(), |
| PythonInterpreterTool(), |
| FinalAnswerTool(), |
| ], |
| max_steps=6, |
| verbosity_level=2, |
| name="MyGAIAgent", |
| description="Agent that solves GAIA level 1 tasks with tools and code execution.", |
| ) |
|
|
| |
| GradioUI(agent).launch() |
|
|