Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,11 +17,14 @@ def create_new_vday_card_tool(theme:str) -> str: #it's import to specify the ret
|
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
# Import tool from Hub
|
|
|
|
| 20 |
image_generation_tool = Tool.from_space(
|
| 21 |
space_id="black-forest-labs/FLUX.1-schnell",
|
| 22 |
name="generate-image",
|
| 23 |
description="Generate image from prompt"
|
| 24 |
)
|
|
|
|
|
|
|
| 25 |
prompt = "Generate a high-resolution image of a valentine's day card themed around " + theme
|
| 26 |
image = image_generation_tool(prompt)
|
| 27 |
return final_answer(image)
|
|
|
|
| 17 |
"""
|
| 18 |
try:
|
| 19 |
# Import tool from Hub
|
| 20 |
+
'''
|
| 21 |
image_generation_tool = Tool.from_space(
|
| 22 |
space_id="black-forest-labs/FLUX.1-schnell",
|
| 23 |
name="generate-image",
|
| 24 |
description="Generate image from prompt"
|
| 25 |
)
|
| 26 |
+
'''
|
| 27 |
+
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 28 |
prompt = "Generate a high-resolution image of a valentine's day card themed around " + theme
|
| 29 |
image = image_generation_tool(prompt)
|
| 30 |
return final_answer(image)
|