Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -68,6 +68,6 @@ if uploaded_file is not None:
|
|
68 |
data = np.array(im) # "data" is a height x width x 4 numpy array
|
69 |
red, green, blue, alpha = data.T # Temporarily unpack the bands for readability'
|
70 |
white_areas = (red == 0) & (blue == 0) & (green == 0)
|
71 |
-
data[..., :-1][white_areas.T] = (
|
72 |
im2 = Image.fromarray(data)
|
73 |
st.image(im2, caption='PoP ArT')
|
|
|
68 |
data = np.array(im) # "data" is a height x width x 4 numpy array
|
69 |
red, green, blue, alpha = data.T # Temporarily unpack the bands for readability'
|
70 |
white_areas = (red == 0) & (blue == 0) & (green == 0)
|
71 |
+
data[..., :-1][white_areas.T] = (0,0,0) # Transpose back needed
|
72 |
im2 = Image.fromarray(data)
|
73 |
st.image(im2, caption='PoP ArT')
|