Amir8212 commited on
Commit
86715a0
·
1 Parent(s): fd0e664

feat: update remove-image-background route

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -362,7 +362,10 @@ async def remove_image_background(image: UploadFile = File(...), token: str = De
362
  return StreamingResponse(
363
  content=buffer,
364
  media_type='image/png',
365
- headers={"Content-Disposition": "inline; filename=image.png"}
 
 
 
366
  )
367
 
368
  except Exception as e:
 
362
  return StreamingResponse(
363
  content=buffer,
364
  media_type='image/png',
365
+ headers={
366
+ "Content-Disposition": "inline; filename=image.png",
367
+ "Content-Length": str(len(buffer.getvalue()))
368
+ }
369
  )
370
 
371
  except Exception as e: