Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,12 +25,9 @@ def create_new_vday_card_tool(theme:str) -> str: #it's import to specify the ret
|
|
| 25 |
description="Generate image from prompt"
|
| 26 |
)
|
| 27 |
'''
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
return final_answer(image)
|
| 32 |
-
else:
|
| 33 |
-
return f"You did not prompt the agent for a Valentine's Day card, please try again"
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error creating card for theme '{theme}': {str(e)}"
|
| 36 |
|
|
|
|
| 25 |
description="Generate image from prompt"
|
| 26 |
)
|
| 27 |
'''
|
| 28 |
+
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 29 |
+
image = image_generation_tool(theme)
|
| 30 |
+
return final_answer(image)
|
|
|
|
|
|
|
|
|
|
| 31 |
except Exception as e:
|
| 32 |
return f"Error creating card for theme '{theme}': {str(e)}"
|
| 33 |
|