AkashKumarave commited on
Commit
18c7db1
·
verified ·
1 Parent(s): 6a39fb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,11 +8,13 @@ import torch
8
 
9
  app = FastAPI()
10
 
11
- # Load the RMBG V1.4 model and processor
12
  model = AutoModelForImageSegmentation.from_pretrained(
13
  "briaai/RMBG-1.4", trust_remote_code=True
14
  )
15
- processor = AutoProcessor.from_pretrained("briaai/RMBG-1.4")
 
 
16
 
17
  @app.post("/remove-background")
18
  async def remove_background(file: UploadFile = File(...)):
 
8
 
9
  app = FastAPI()
10
 
11
+ # Load the RMBG V1.4 model and processor with trust_remote_code=True
12
  model = AutoModelForImageSegmentation.from_pretrained(
13
  "briaai/RMBG-1.4", trust_remote_code=True
14
  )
15
+ processor = AutoProcessor.from_pretrained(
16
+ "briaai/RMBG-1.4", trust_remote_code=True
17
+ )
18
 
19
  @app.post("/remove-background")
20
  async def remove_background(file: UploadFile = File(...)):