Spaces:
Sleeping
Sleeping
PoHengLin commited on
Commit ·
de9444d
1
Parent(s): ae7a494
add current time tool
Browse files
app.py
CHANGED
|
@@ -53,9 +53,16 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
|
|
| 53 |
with open("prompts.yaml", 'r') as stream:
|
| 54 |
prompt_templates = yaml.safe_load(stream)
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
-
tools=
|
| 59 |
max_steps=6,
|
| 60 |
verbosity_level=1,
|
| 61 |
grammar=None,
|
|
@@ -66,4 +73,4 @@ agent = CodeAgent(
|
|
| 66 |
)
|
| 67 |
|
| 68 |
|
| 69 |
-
GradioUI(agent).launch()
|
|
|
|
| 53 |
with open("prompts.yaml", 'r') as stream:
|
| 54 |
prompt_templates = yaml.safe_load(stream)
|
| 55 |
|
| 56 |
+
|
| 57 |
+
tools = [
|
| 58 |
+
get_current_time_in_timezone,
|
| 59 |
+
# Do not remove
|
| 60 |
+
final_answer
|
| 61 |
+
]
|
| 62 |
+
|
| 63 |
agent = CodeAgent(
|
| 64 |
model=model,
|
| 65 |
+
tools=tools, ## add your tools here (don't remove final answer)
|
| 66 |
max_steps=6,
|
| 67 |
verbosity_level=1,
|
| 68 |
grammar=None,
|
|
|
|
| 73 |
)
|
| 74 |
|
| 75 |
|
| 76 |
+
GradioUI(agent).launch()
|