Spaces:
Sleeping
Sleeping
| from smolagents import CodeAgent, HfApiModel, tool | |
| from Gradio_UI import GradioUI | |
| def ping() -> str: | |
| """Simple test tool""" | |
| return "pong" | |
| model = HfApiModel( | |
| model_id="mistralai/Mistral-7B-Instruct-v0.2", | |
| max_tokens=512, | |
| ) | |
| agent = CodeAgent( | |
| model=model, | |
| tools=[ping], | |
| max_steps=3, | |
| ) | |
| GradioUI(agent).launch() | |