insomnia7 commited on
Commit
47787a6
·
verified ·
1 Parent(s): 2b62d60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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[tag] = 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
 
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