fix: couple of fixes
This commit is contained in:
3
app.py
3
app.py
@@ -52,5 +52,6 @@ def create_app() -> Flask:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
port = int(os.environ.get("PORT", "7860"))
|
port = int(os.environ.get("PORT", "7860"))
|
||||||
|
debug = os.environ.get("FLASK_DEBUG", "0") == "1"
|
||||||
app = create_app()
|
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)
|
||||||
|
|||||||
@@ -212,7 +212,12 @@ def to_yaml(nodes: list[NormalizedNode], relations: list[NormalizedRelation]) ->
|
|||||||
)
|
)
|
||||||
|
|
||||||
doc = {"entities": entities, "relations": rel_items}
|
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:
|
def compile_graph(graph: dict[str, Any]) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user