Spaces:
Sleeping
Sleeping
Update app.py
#6
by keertan2610 - opened
app.py
CHANGED
|
@@ -11,7 +11,7 @@ def greet_json():
|
|
| 11 |
|
| 12 |
@app.get("/get-image")
|
| 13 |
async def get_image(filename: str):
|
| 14 |
-
image_path = f"
|
| 15 |
if not os.path.exists(image_path):
|
| 16 |
return {"error": "Image not found"}
|
| 17 |
return FileResponse(image_path, media_type="image/jpeg", filename=filename)
|
|
|
|
| 11 |
|
| 12 |
@app.get("/get-image")
|
| 13 |
async def get_image(filename: str):
|
| 14 |
+
image_path = f"./{filename}"
|
| 15 |
if not os.path.exists(image_path):
|
| 16 |
return {"error": "Image not found"}
|
| 17 |
return FileResponse(image_path, media_type="image/jpeg", filename=filename)
|