Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,8 +85,5 @@ async def run_code(code: Code):
|
|
85 |
|
86 |
@app.get("/chart/{project_id}/{chain_id}/{session_id}")
|
87 |
async def get_chart(project_id: str, chain_id: str, session_id: str):
|
88 |
-
|
89 |
-
|
90 |
-
return Response(pdf_buffer.read(), media_type="application/pdf", headers={
|
91 |
-
"Content-Disposition": f'inline; filename="graphs_{project_id}_{chain_id}_{session_id}.pdf"'
|
92 |
-
})
|
|
|
85 |
|
86 |
@app.get("/chart/{project_id}/{chain_id}/{session_id}")
|
87 |
async def get_chart(project_id: str, chain_id: str, session_id: str):
|
88 |
+
pdf_path = f"graph_{project_id}_{chain_id}_{session_id}.pdf"
|
89 |
+
return FileResponse(pdf_path, media_type="application/pdf")
|
|
|
|
|
|