Update app.py
Browse files
app.py
CHANGED
|
@@ -622,7 +622,7 @@ def infer_seg(media, query):
|
|
| 622 |
dyn_color_map_light = {}
|
| 623 |
for i, tag in enumerate(unique_tags):
|
| 624 |
c = colors[i % len(colors)]
|
| 625 |
-
dyn_color_map[
|
| 626 |
dyn_color_map_light[tag] = f'#{int(c[0] * 127.5 + 127.5):02x}{int(c[1] * 127.5 + 127.5):02x}{int(c[2] * 127.5 + 127.5):02x}'
|
| 627 |
|
| 628 |
# return answer, masks, path
|
|
|
|
| 622 |
dyn_color_map_light = {}
|
| 623 |
for i, tag in enumerate(unique_tags):
|
| 624 |
c = colors[i % len(colors)]
|
| 625 |
+
dyn_color_map[entity_names[i]] = f'#{int(c[0]):02x}{int(c[1]):02x}{int(c[2]):02x}'
|
| 626 |
dyn_color_map_light[tag] = f'#{int(c[0] * 127.5 + 127.5):02x}{int(c[1] * 127.5 + 127.5):02x}{int(c[2] * 127.5 + 127.5):02x}'
|
| 627 |
|
| 628 |
# return answer, masks, path
|