smolagents/examples/gradio_ui.py
Aksel Joonas Reedi d60c7beea9
Adding optional structured generation to CodeAgent (#1346)
Co-authored-by: Aksel <aksel@huggingface.co>
Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
2025-05-22 15:52:01 +02:00

16 lines
472 B
Python

from smolagents import CodeAgent, GradioUI, InferenceClientModel
agent = CodeAgent(
tools=[],
model=InferenceClientModel(model_id="meta-llama/Llama-3.3-70B-Instruct", provider="fireworks-ai"),
verbosity_level=1,
planning_interval=3,
name="example_agent",
description="This is an example agent.",
step_callbacks=[],
stream_outputs=False,
use_structured_outputs_internally=True,
)
GradioUI(agent, file_upload_folder="./data").launch()