Kia09 keertan2610 commited on
Commit
16aea7d
·
verified ·
1 Parent(s): 16d3571

Update app.py (#8)

Browse files

- Update app.py (62f462837f24493079f86dd1fb2cc7b5fc00081f)


Co-authored-by: Keertan Balaji <keertan2610@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
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"./{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)
 
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)