Spaces:
Sleeping
Sleeping
add some tools
Browse files
app.py
CHANGED
|
@@ -47,7 +47,8 @@ custom_role_conversions=None,
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
| 50 |
-
# Import tool from Hub
|
|
|
|
| 51 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 52 |
|
| 53 |
with open("prompts.yaml", 'r') as stream:
|
|
@@ -55,7 +56,9 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
-
tools=[final_answer
|
|
|
|
|
|
|
| 59 |
max_steps=6,
|
| 60 |
verbosity_level=1,
|
| 61 |
grammar=None,
|
|
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
| 50 |
+
# Import tool from Hub (spaces)
|
| 51 |
+
# url: https://huggingface.co/spaces/agents-course/text-to-image/blob/main/tool.py
|
| 52 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 53 |
|
| 54 |
with open("prompts.yaml", 'r') as stream:
|
|
|
|
| 56 |
|
| 57 |
agent = CodeAgent(
|
| 58 |
model=model,
|
| 59 |
+
tools=[final_answer,
|
| 60 |
+
image_generation_tool,
|
| 61 |
+
get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 62 |
max_steps=6,
|
| 63 |
verbosity_level=1,
|
| 64 |
grammar=None,
|