Spaces:
Sleeping
Sleeping
File size: 893 Bytes
0b8e564 e7320d0 0b8e564 e7320d0 0b8e564 e7320d0 |
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 |
# AUTOGENERATED! DO NOT EDIT! File to edit: ../../nbs/book/Agents/02_App.ipynb.
# %% auto 0
__all__ = ['final_answer', 'model', 'agent']
# %% ../../nbs/book/Agents/02_App.ipynb 5
from fastcore.all import *
import time
# from gradioui import GradioUI
from smolagents import GradioUI, FinalAnswerTool, HfApiModel, CodeAgent
# %% ../../nbs/book/Agents/02_App.ipynb 6
#| eval: false
final_answer = FinalAnswerTool()
final_answer
# %% ../../nbs/book/Agents/02_App.ipynb 7
model = HfApiModel()
model.client
# %% ../../nbs/book/Agents/02_App.ipynb 10
agent = CodeAgent(
tools=[FinalAnswerTool()],
model=HfApiModel(),
verbosity_level=1,
planning_interval=3,
name="AgentCourse101",
description="This is an example agent that has not tool but will always see an agent at the end of its step.",
)
# %% ../../nbs/book/Agents/02_App.ipynb 11
GradioUI(agent=agent).launch()
|