smolagents/examples/gradio_ui.py
Aymeric Roucher d02f0cc6a9
Working streaming Gradio chatbot outputs (#1246)
Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-04-30 16:15:51 +02:00

15 lines
359 B
Python

from smolagents import CodeAgent, GradioUI, InferenceClientModel
agent = CodeAgent(
tools=[],
model=InferenceClientModel(),
verbosity_level=1,
planning_interval=3,
name="example_agent",
description="This is an example agent.",
step_callbacks=[],
stream_outputs=False,
)
GradioUI(agent, file_upload_folder="./data").launch()