Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,12 +27,19 @@ dynamicTool_TextToImage = smolagents.load_tool(
|
|
| 27 |
trust_remote_code=True
|
| 28 |
)
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
|
| 31 |
prompt_templates = yaml.safe_load(stream)
|
| 32 |
|
| 33 |
|
| 34 |
codeAgent_Party = CodeAgent(model=InferenceClientModel(model_id='Qwen/Qwen2.5-Coder-3B-Instruct'), max_steps=10, verbosity_level=2,
|
| 35 |
-
tools = [final_answer, web_search, visit_webpage, suggest_menu, catering_service_tool,
|
|
|
|
| 36 |
executor_type='local',
|
| 37 |
executor_kwargs={},
|
| 38 |
max_print_outputs_length=None,
|
|
|
|
| 27 |
trust_remote_code=True
|
| 28 |
)
|
| 29 |
|
| 30 |
+
spaceTool_ImageGenerator = smolagents.Tool.from_space(
|
| 31 |
+
"black-forest-labs/FLUX.1-schnell",
|
| 32 |
+
name="image_generator",
|
| 33 |
+
description="Generate an image from a prompt"
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
|
| 37 |
prompt_templates = yaml.safe_load(stream)
|
| 38 |
|
| 39 |
|
| 40 |
codeAgent_Party = CodeAgent(model=InferenceClientModel(model_id='Qwen/Qwen2.5-Coder-3B-Instruct'), max_steps=10, verbosity_level=2,
|
| 41 |
+
tools = [final_answer, web_search, visit_webpage, suggest_menu, catering_service_tool,
|
| 42 |
+
superhero_party_theme_generator, dynamicTool_TextToImage, spaceTool_ImageGenerator],
|
| 43 |
executor_type='local',
|
| 44 |
executor_kwargs={},
|
| 45 |
max_print_outputs_length=None,
|