artelabsuper commited on
Commit
48c62f7
·
1 Parent(s): 1920ef2

colors hex

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import zipfile
4
  import torch
5
  from utils import *
6
  import matplotlib.pyplot as plt
 
7
 
8
  if not hasattr(st, 'paths'):
9
  st.paths = None
@@ -168,7 +169,8 @@ if st.paths is not None:
168
 
169
  markdown_legend = ''
170
  for c, l in zip(classes_color_map, labels_map):
171
- markdown_legend += f'<div style="color:gray;background-color: rgb({c[0]*255}, {c[1]*255}, {c[2]*255});">{l}</div><br>'
 
172
 
173
  col1, col2 = st.columns(2)
174
  with col1:
 
4
  import torch
5
  from utils import *
6
  import matplotlib.pyplot as plt
7
+ from matplotlib import colors
8
 
9
  if not hasattr(st, 'paths'):
10
  st.paths = None
 
169
 
170
  markdown_legend = ''
171
  for c, l in zip(classes_color_map, labels_map):
172
+ print(colors.to_hex(c))
173
+ markdown_legend += f'<div style="color:gray;background-color: {colors.to_hex(c)};">{l}</div><br>'
174
 
175
  col1, col2 = st.columns(2)
176
  with col1: