Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,14 +38,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 38 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 39 |
|
| 40 |
@tool
|
| 41 |
-
def generate_image(
|
| 42 |
"""A tool that generate the image based on text prompt.
|
| 43 |
Args:
|
| 44 |
-
|
| 45 |
-
- prompt(str): The text description used to generate the image.
|
| 46 |
"""
|
| 47 |
try:
|
| 48 |
-
prompt = args["prompt"]
|
| 49 |
image = image_generation_tool(prompt)
|
| 50 |
return {"image":image}
|
| 51 |
except Exception as e:
|
|
|
|
| 38 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 39 |
|
| 40 |
@tool
|
| 41 |
+
def generate_image(prompt:str)-> dict:
|
| 42 |
"""A tool that generate the image based on text prompt.
|
| 43 |
Args:
|
| 44 |
+
prompt: The text description used to generate the image.
|
|
|
|
| 45 |
"""
|
| 46 |
try:
|
|
|
|
| 47 |
image = image_generation_tool(prompt)
|
| 48 |
return {"image":image}
|
| 49 |
except Exception as e:
|