Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from Gradio_UI import GradioUI
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
-
def my_custom_tool(arg1:str, img: bool)-> str: #it's import to specify the return type
|
| 14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 15 |
"""A tool that uses 'DuckDuckGoSearchTool' tool to answer any query.
|
| 16 |
Args:
|
|
@@ -20,7 +20,7 @@ def my_custom_tool(arg1:str, img: bool)-> str: #it's import to specify the retur
|
|
| 20 |
try:
|
| 21 |
if img:
|
| 22 |
img = image_generation_tool(arg1)
|
| 23 |
-
return img
|
| 24 |
else:
|
| 25 |
search_obj = DuckDuckGoSearchTool()
|
| 26 |
answer = search_obj(arg1)
|
|
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
+
def my_custom_tool(arg1:str, img: bool)-> str|Image: #it's import to specify the return type
|
| 14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 15 |
"""A tool that uses 'DuckDuckGoSearchTool' tool to answer any query.
|
| 16 |
Args:
|
|
|
|
| 20 |
try:
|
| 21 |
if img:
|
| 22 |
img = image_generation_tool(arg1)
|
| 23 |
+
return Image(img)
|
| 24 |
else:
|
| 25 |
search_obj = DuckDuckGoSearchTool()
|
| 26 |
answer = search_obj(arg1)
|