Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,6 +97,11 @@ class SuperheroPartyThemeTool(Tool):
|
|
| 97 |
|
| 98 |
return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
|
| 102 |
final_answer = FinalAnswerTool()
|
|
@@ -126,7 +131,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 126 |
|
| 127 |
agent = CodeAgent(
|
| 128 |
model=model,
|
| 129 |
-
tools=[final_answer, image_generation_tool, my_custom_tool, get_current_time_in_timezone, web_search, visit_webpage, python_tool,
|
| 130 |
suggest_menu, catering_service_tool, SuperheroPartyThemeTool()], ## add your tools here (don't remove final answer)
|
| 131 |
max_steps=10,
|
| 132 |
verbosity_level=1,
|
|
|
|
| 97 |
|
| 98 |
return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")
|
| 99 |
|
| 100 |
+
image_generation_tool = Tool.from_space(
|
| 101 |
+
"black-forest-labs/FLUX.1-schnell",
|
| 102 |
+
name="image_generator",
|
| 103 |
+
description="Generate an image from a prompt"
|
| 104 |
+
)
|
| 105 |
|
| 106 |
|
| 107 |
final_answer = FinalAnswerTool()
|
|
|
|
| 131 |
|
| 132 |
agent = CodeAgent(
|
| 133 |
model=model,
|
| 134 |
+
tools=[final_answer, image_generation_tool, my_custom_tool, get_current_time_in_timezone, web_search, visit_webpage, python_tool, image_generation_tool,
|
| 135 |
suggest_menu, catering_service_tool, SuperheroPartyThemeTool()], ## add your tools here (don't remove final answer)
|
| 136 |
max_steps=10,
|
| 137 |
verbosity_level=1,
|