Commit
·
69e1abf
1
Parent(s):
ef7cf2b
- __pycache__/app.cpython-310.pyc +0 -0
- app.py +0 -8
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -51,11 +51,3 @@ def detect_edges(url: str):
|
|
| 51 |
except Exception as e:
|
| 52 |
raise HTTPException(status_code=400, detail=str(e))
|
| 53 |
|
| 54 |
-
|
| 55 |
-
@app.get("/download/{filename}")
|
| 56 |
-
def download_file(filename: str):
|
| 57 |
-
file_path = f"/tmp/{filename}"
|
| 58 |
-
if os.path.exists(file_path):
|
| 59 |
-
return FileResponse(file_path, media_type='image/png', filename=filename)
|
| 60 |
-
else:
|
| 61 |
-
raise HTTPException(status_code=404, detail="File not found")
|
|
|
|
| 51 |
except Exception as e:
|
| 52 |
raise HTTPException(status_code=400, detail=str(e))
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|