RobotJelly commited on
Commit
730ac44
·
verified ·
1 Parent(s): 01ba1c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,8 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
- from PIL.Image import Image
 
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)