fix: couple of fixes

This commit is contained in:
Enrico Buratto
2026-03-29 12:30:14 +02:00
parent 2019cb0807
commit 00bdfaa21f
2 changed files with 8 additions and 2 deletions

3
app.py
View File

@@ -52,5 +52,6 @@ def create_app() -> Flask:
if __name__ == "__main__":
port = int(os.environ.get("PORT", "7860"))
debug = os.environ.get("FLASK_DEBUG", "0") == "1"
app = create_app()
app.run(host="0.0.0.0", port=port, debug=True)
app.run(host="0.0.0.0", port=port, debug=debug)

View File

@@ -212,7 +212,12 @@ def to_yaml(nodes: list[NormalizedNode], relations: list[NormalizedRelation]) ->
)
doc = {"entities": entities, "relations": rel_items}
return yaml.safe_dump(doc, sort_keys=False)
return yaml.safe_dump(
doc,
sort_keys=False,
default_flow_style=False,
allow_unicode=True,
)
def compile_graph(graph: dict[str, Any]) -> str: