Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,8 @@ def my_custom_tool(arg1:str, img: bool)-> Any: #it's import to specify the retur
|
|
21 |
"""
|
22 |
try:
|
23 |
if img:
|
|
|
|
|
24 |
return image_generation_tool(arg1)
|
25 |
else:
|
26 |
search_obj = DuckDuckGoSearchTool()
|
@@ -58,8 +60,8 @@ custom_role_conversions=None,
|
|
58 |
)
|
59 |
|
60 |
|
61 |
-
# Import tool from Hub
|
62 |
-
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
63 |
|
64 |
with open("prompts.yaml", 'r') as stream:
|
65 |
prompt_templates = yaml.safe_load(stream)
|
|
|
21 |
"""
|
22 |
try:
|
23 |
if img:
|
24 |
+
# Import tool from Hub
|
25 |
+
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
26 |
return image_generation_tool(arg1)
|
27 |
else:
|
28 |
search_obj = DuckDuckGoSearchTool()
|
|
|
60 |
)
|
61 |
|
62 |
|
63 |
+
# # Import tool from Hub
|
64 |
+
# image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
65 |
|
66 |
with open("prompts.yaml", 'r') as stream:
|
67 |
prompt_templates = yaml.safe_load(stream)
|