Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadd to code agent
app.py
CHANGED
@@ -69,10 +69,11 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
|
|
69 |
|
70 |
with open("prompts.yaml", 'r') as stream:
|
71 |
prompt_templates = yaml.safe_load(stream)
|
72 |
-
|
|
|
73 |
agent = CodeAgent(
|
74 |
model=model,
|
75 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
76 |
max_steps=6,
|
77 |
verbosity_level=1,
|
78 |
grammar=None,
|
@@ -82,5 +83,5 @@ agent = CodeAgent(
|
|
82 |
prompt_templates=prompt_templates
|
83 |
)
|
84 |
|
85 |
-
|
86 |
GradioUI(agent).launch()
|
|
|
69 |
|
70 |
with open("prompts.yaml", 'r') as stream:
|
71 |
prompt_templates = yaml.safe_load(stream)
|
72 |
+
|
73 |
+
# Define the agent and include the tools
|
74 |
agent = CodeAgent(
|
75 |
model=model,
|
76 |
+
tools=[final_answer, random_fun_fact], ## add your tools here (don't remove final answer)
|
77 |
max_steps=6,
|
78 |
verbosity_level=1,
|
79 |
grammar=None,
|
|
|
83 |
prompt_templates=prompt_templates
|
84 |
)
|
85 |
|
86 |
+
# Define the agent and include the tools
|
87 |
GradioUI(agent).launch()
|