Spaces:
Running
on
Zero
Running
on
Zero
Update app_3.py
Browse files
app_3.py
CHANGED
@@ -391,7 +391,7 @@ def infer(
|
|
391 |
else: # RGB
|
392 |
image = Image.fromarray(image, 'RGB')
|
393 |
|
394 |
-
logging.info(f"Converted to PIL Image mode: {image.mode}")
|
395 |
|
396 |
# No need for remove_bg_fn since image is already processed
|
397 |
remove_bg_fn = None
|
@@ -632,7 +632,7 @@ def extract_foreground(image):
|
|
632 |
#logging.info(f"Input image shape: {image.shape}, dtype: {image.dtype}")
|
633 |
#result, rgba = run_rmbg(image)
|
634 |
result = run_rmbg(image)
|
635 |
-
logging.info(f"Result shape: {result.shape}, dtype: {result.dtype}")
|
636 |
#logging.info(f"RGBA shape: {rgba.shape}, dtype: {rgba.dtype}")
|
637 |
return result, gr.update(visible=True), gr.update(visible=True)
|
638 |
|
|
|
391 |
else: # RGB
|
392 |
image = Image.fromarray(image, 'RGB')
|
393 |
|
394 |
+
#logging.info(f"Converted to PIL Image mode: {image.mode}")
|
395 |
|
396 |
# No need for remove_bg_fn since image is already processed
|
397 |
remove_bg_fn = None
|
|
|
632 |
#logging.info(f"Input image shape: {image.shape}, dtype: {image.dtype}")
|
633 |
#result, rgba = run_rmbg(image)
|
634 |
result = run_rmbg(image)
|
635 |
+
#logging.info(f"Result shape: {result.shape}, dtype: {result.dtype}")
|
636 |
#logging.info(f"RGBA shape: {rgba.shape}, dtype: {rgba.dtype}")
|
637 |
return result, gr.update(visible=True), gr.update(visible=True)
|
638 |
|