ManojINaik commited on
Commit
d6697f3
·
verified ·
1 Parent(s): 58f53ad

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -43,8 +43,8 @@ async def generate_roadmap_endpoint(course_request: CourseRequest):
43
  diagram = create_diagram(roadmap_text)
44
 
45
  # Render the diagram to a PNG image
46
- diagram_path = "/tmp/roadmap"
47
  diagram.render(diagram_path, format='png', cleanup=True)
48
 
49
- with open(diagram_path + ".png", "rb") as f:
50
  return Response(content=f.read(), media_type="image/png")
 
43
  diagram = create_diagram(roadmap_text)
44
 
45
  # Render the diagram to a PNG image
46
+ diagram_path = "/tmp/roadmap.png"
47
  diagram.render(diagram_path, format='png', cleanup=True)
48
 
49
+ with open(diagram_path, "rb") as f:
50
  return Response(content=f.read(), media_type="image/png")