0r0b0r0s commited on
Commit
1ba0693
·
verified ·
1 Parent(s): fc30217

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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,