Spaces:
Running
Running
File size: 374 Bytes
c8e458d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from erp_core.node_builder import graph
try:
image_path = "output_image.png"
# Get the image bytes
image_data = graph.get_graph(xray=True).draw_mermaid_png()
# Save bytes to file
with open(image_path, 'wb') as f:
f.write(image_data)
print(f"Image saved at {image_path}")
except Exception as e:
print(f"An error occurred: {e}")
|