VINU NAYAK commited on
Commit
9edcf5b
·
verified ·
1 Parent(s): 4de794b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -1,13 +1,4 @@
1
- # app.py
2
- from fastapi import FastAPI, UploadFile, File
3
- from fastapi.responses import StreamingResponse
4
- from rembg import remove
5
- import io
6
 
7
- app = FastAPI()
8
-
9
- @app.post("/remove-bg")
10
- async def remove_bg(file: UploadFile = File(...)):
11
- input_image = await file.read()
12
- output_image = remove(input_image)
13
- return StreamingResponse(io.BytesIO(output_image), media_type="image/png")
 
1
+ from app.main import app
 
 
 
 
2
 
3
+ # This file is needed for Hugging Face Spaces compatibility
4
+ # The app is imported from app.main