Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,8 @@ import requests
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
-
|
|
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
@@ -19,7 +20,7 @@ def my_custom_tool(arg1:str, img: bool)-> str: #it's import to specify the retur
|
|
19 |
"""
|
20 |
try:
|
21 |
if img:
|
22 |
-
return image_generation_tool(arg1)
|
23 |
else:
|
24 |
search_obj = DuckDuckGoSearchTool()
|
25 |
answer = search_obj(arg1)
|
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
+
import PIL
|
8 |
+
from PIL import Image
|
9 |
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
|
|
20 |
"""
|
21 |
try:
|
22 |
if img:
|
23 |
+
return Image.open(image_generation_tool(arg1))
|
24 |
else:
|
25 |
search_obj = DuckDuckGoSearchTool()
|
26 |
answer = search_obj(arg1)
|