Zeph27 commited on
Commit
22326c6
·
1 Parent(s): 3deb895

change to cpu

Browse files
Files changed (2) hide show
  1. .gitignore +2 -1
  2. app.py +1 -1
.gitignore CHANGED
@@ -4,4 +4,5 @@ temp_output/
4
  processed_images.zip
5
  test_input/
6
  test_output/
7
- bria_output/
 
 
4
  processed_images.zip
5
  test_input/
6
  test_output/
7
+ bria_output/
8
+ processed_images/
app.py CHANGED
@@ -22,7 +22,7 @@ def remove_background_rembg(input_path):
22
 
23
  def remove_background_bria(input_path):
24
  print(f"Removing background using bria for image: {input_path}")
25
- pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True, device=0)
26
  pillow_image = pipe(input_path)
27
  return pillow_image
28
 
 
22
 
23
  def remove_background_bria(input_path):
24
  print(f"Removing background using bria for image: {input_path}")
25
+ pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True, device=-1)
26
  pillow_image = pipe(input_path)
27
  return pillow_image
28