timsmykov commited on
Commit
c8908d8
·
verified ·
1 Parent(s): 9b44e12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -40,9 +40,11 @@ model = HfApiModel(
40
  # Import tool from Hub
41
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
42
 
43
-
44
  with open("prompts.yaml", 'r') as stream:
45
- prompt_templates = yaml.safe_load(stream)
 
 
 
46
 
47
  prompt_templates['system_prompt'] = system_prompt
48
 
 
40
  # Import tool from Hub
41
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
42
 
 
43
  with open("prompts.yaml", 'r') as stream:
44
+ try:
45
+ system_prompt = yaml.safe_load(stream)
46
+ except yaml.YAMLError as exc:
47
+ print(exc)
48
 
49
  prompt_templates['system_prompt'] = system_prompt
50