Spaces:
Running
Running
si.qian
commited on
Commit
·
a6fa011
1
Parent(s):
3bfcd29
solve bug
Browse files
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
|
| 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
|
| 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()
|