Spaces:
Runtime error
Runtime error
fajw942ghh13
commited on
Commit
•
7eb671f
1
Parent(s):
67424e4
Update app.py
Browse files
app.py
CHANGED
@@ -139,15 +139,15 @@ def main_convert(filename):
|
|
139 |
|
140 |
final_img = concat_lengends(np.array(fused_img), np.array(legend_predicted))
|
141 |
|
142 |
-
seg = seg.convert("RGBA")
|
143 |
-
pixdata = seg.load()
|
144 |
|
145 |
-
width, height = seg.size
|
146 |
-
for y in range(height):
|
147 |
for x in range(width):
|
148 |
if pixdata[x, y] == (255, 255, 255, 255):
|
149 |
pixdata[x, y] = (255, 255, 255, 0)
|
150 |
-
return img, seg
|
151 |
|
152 |
|
153 |
|
|
|
139 |
|
140 |
final_img = concat_lengends(np.array(fused_img), np.array(legend_predicted))
|
141 |
|
142 |
+
seg = seg.convert("RGBA")
|
143 |
+
pixdata = seg.load()
|
144 |
|
145 |
+
width, height = seg.size
|
146 |
+
for y in range(height):
|
147 |
for x in range(width):
|
148 |
if pixdata[x, y] == (255, 255, 255, 255):
|
149 |
pixdata[x, y] = (255, 255, 255, 0)
|
150 |
+
return img, seg
|
151 |
|
152 |
|
153 |
|