Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,11 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
|
|
78 |
|
79 |
with open("prompts.yaml", 'r') as stream:
|
80 |
prompt_templates = yaml.safe_load(stream)
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
agent = CodeAgent(
|
83 |
model=model,
|
|
|
78 |
|
79 |
with open("prompts.yaml", 'r') as stream:
|
80 |
prompt_templates = yaml.safe_load(stream)
|
81 |
+
|
82 |
+
# Convert string values to nested dictionaries
|
83 |
+
for key in list(prompt_templates.keys()):
|
84 |
+
if isinstance(prompt_templates[key], str):
|
85 |
+
prompt_templates[key] = {"content": prompt_templates[key]}
|
86 |
|
87 |
agent = CodeAgent(
|
88 |
model=model,
|