Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import yaml
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from huggingface_hub import InferenceClient
|
| 8 |
from Gradio_UI import GradioUI
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
|
@@ -34,7 +35,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
@tool
|
| 37 |
-
def image_generator(description: str):
|
| 38 |
"""A tool that generates an image from a description.
|
| 39 |
Args:
|
| 40 |
description: A string representing the description of the image.
|
|
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from huggingface_hub import InferenceClient
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
+
from PIL import Image
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
|
|
|
| 35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 36 |
|
| 37 |
@tool
|
| 38 |
+
def image_generator(description: str)->Image.Image :
|
| 39 |
"""A tool that generates an image from a description.
|
| 40 |
Args:
|
| 41 |
description: A string representing the description of the image.
|