Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,14 +9,13 @@ from tools.final_answer import FinalAnswerTool
|
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
@tool
|
| 12 |
-
def
|
| 13 |
-
"""A tool that
|
| 14 |
Args:
|
| 15 |
-
arg1:
|
| 16 |
-
arg2: the second argument
|
| 17 |
"""
|
| 18 |
-
|
| 19 |
-
|
| 20 |
@tool
|
| 21 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 22 |
"""A tool that fetches the current local time in a specified timezone.
|
|
@@ -49,7 +48,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 49 |
|
| 50 |
agent = CodeAgent(
|
| 51 |
model=model,
|
| 52 |
-
tools=[final_answer],
|
| 53 |
max_steps=6,
|
| 54 |
verbosity_level=1,
|
| 55 |
grammar=None,
|
|
|
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
@tool
|
| 12 |
+
def generate_an_image(arg1:str)->int:
|
| 13 |
+
"""A tool that generates an image with given description
|
| 14 |
Args:
|
| 15 |
+
arg1: a description of what should be displayed on image
|
|
|
|
| 16 |
"""
|
| 17 |
+
|
| 18 |
+
return image_generation_tool(arg1)
|
| 19 |
@tool
|
| 20 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 21 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 48 |
|
| 49 |
agent = CodeAgent(
|
| 50 |
model=model,
|
| 51 |
+
tools=[final_answer,generate_an_image],
|
| 52 |
max_steps=6,
|
| 53 |
verbosity_level=1,
|
| 54 |
grammar=None,
|