Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,14 +38,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 39 |
|
| 40 |
@tool
|
| 41 |
-
def generate_image(prompt:str
|
| 42 |
"""Generate image(s) from a text prompt via HF text-to-image.
|
| 43 |
Args:
|
| 44 |
prompt: description of the image
|
| 45 |
-
num_images: how many to produce
|
| 46 |
-
size: image resolution (e.g. "512x512")
|
| 47 |
"""
|
| 48 |
-
return image_generation_tool(prompt
|
| 49 |
|
| 50 |
@tool
|
| 51 |
def duckduckgo_search(query: str, max_results: int=5) -> str:
|
|
|
|
| 38 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 39 |
|
| 40 |
@tool
|
| 41 |
+
def generate_image(prompt:str) -> list:
|
| 42 |
"""Generate image(s) from a text prompt via HF text-to-image.
|
| 43 |
Args:
|
| 44 |
prompt: description of the image
|
|
|
|
|
|
|
| 45 |
"""
|
| 46 |
+
return image_generation_tool(prompt)
|
| 47 |
|
| 48 |
@tool
|
| 49 |
def duckduckgo_search(query: str, max_results: int=5) -> str:
|