GranularFireplace commited on
Commit
572f65a
·
verified ·
1 Parent(s): 27d9f2a
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -354,7 +354,7 @@ def convert_binary_to_image(binary_path: str, output_path: str, width: int):
354
  @app.get("/image/{file_name}")
355
  async def image(file_name: str):
356
  if os.path.exists(os.path.join(UPLOAD_DIR, file_name)):
357
- return FileResponse(file_name, media_type="image/png")
358
  return JSONResponse(content={"error": "Image not found"})
359
 
360
  @app.get("/analysebin/{file_name}")
 
354
  @app.get("/image/{file_name}")
355
  async def image(file_name: str):
356
  if os.path.exists(os.path.join(UPLOAD_DIR, file_name)):
357
+ return FileResponse(os.path.join(UPLOAD_DIR, file_name), media_type="image/png")
358
  return JSONResponse(content={"error": "Image not found"})
359
 
360
  @app.get("/analysebin/{file_name}")