Spaces:
Sleeping
Sleeping
Update app.py
Browse filesTry using PIL library to define Image
app.py
CHANGED
@@ -4,6 +4,7 @@ import requests
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
|
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
@@ -51,7 +52,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
51 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
52 |
|
53 |
@tool
|
54 |
-
def generate_image(description: str):
|
55 |
"""A tool that generates an image from a text description.
|
56 |
Args:
|
57 |
description: A string representing the text description to generate an image of.
|
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
+
from PIL import Image
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
|
|
52 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
53 |
|
54 |
@tool
|
55 |
+
def generate_image(description: str) -> Image:
|
56 |
"""A tool that generates an image from a text description.
|
57 |
Args:
|
58 |
description: A string representing the text description to generate an image of.
|