si.qian commited on
Commit
a6fa011
·
1 Parent(s): 3bfcd29
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -27,9 +27,9 @@ def run_rembg(img):
27
  output_pil = Image.fromarray(output)
28
 
29
  # Remove margins
30
- cropped_image = output_pil.crop(output_pil.getbbox())
31
 
32
- return cropped_image
33
 
34
  def run_rembg_withmodel(img, model):
35
  logger.debug(f"model name : {model}")
@@ -40,9 +40,9 @@ def run_rembg_withmodel(img, model):
40
  output_pil = Image.fromarray(output)
41
 
42
  # Remove margins
43
- cropped_image = output_pil.crop(output_pil.getbbox())
44
 
45
- return cropped_image
46
 
47
  def from_zip(inputs):
48
  work_dir = get_random_name()
 
27
  output_pil = Image.fromarray(output)
28
 
29
  # Remove margins
30
+ # cropped_image = output_pil.crop(output_pil.getbbox())
31
 
32
+ return output_pil
33
 
34
  def run_rembg_withmodel(img, model):
35
  logger.debug(f"model name : {model}")
 
40
  output_pil = Image.fromarray(output)
41
 
42
  # Remove margins
43
+ # cropped_image = output_pil.crop(output_pil.getbbox())
44
 
45
+ return output_pil
46
 
47
  def from_zip(inputs):
48
  work_dir = get_random_name()