Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
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 |
|