Spaces:
Sleeping
Sleeping
img fix
Browse files
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}")
|