Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -138,11 +138,8 @@ def inference(image: Image):
|
|
138 |
bg_color = 0x00C49AFF
|
139 |
w = im_rgba.size[0]
|
140 |
h = im_rgba.size[1]
|
141 |
-
|
142 |
-
|
143 |
-
im_colored = Image.new("RGBA", (w,h))
|
144 |
-
im_colored.paste(bg)
|
145 |
-
im_colored.paste(im_rgba)
|
146 |
|
147 |
return [im_colored, pil_mask]
|
148 |
|
|
|
138 |
bg_color = 0x00C49AFF
|
139 |
w = im_rgba.size[0]
|
140 |
h = im_rgba.size[1]
|
141 |
+
im_colored = Image.new("RGBA", (w,h), bg_color)
|
142 |
+
im_colored.alpha_composite(im_rgba)
|
|
|
|
|
|
|
143 |
|
144 |
return [im_colored, pil_mask]
|
145 |
|