Spaces:
Running
on
A10G
Running
on
A10G
BertChristiaens
commited on
Commit
•
5e179d4
1
Parent(s):
6e3a1b8
add colors
Browse files
app.py
CHANGED
@@ -160,11 +160,13 @@ def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, pain
|
|
160 |
# get unique RGB colors from this segmentation map
|
161 |
st.image(Image.fromarray(real_seg), width=512)
|
162 |
print(real_seg.shape)
|
|
|
163 |
unique_colors = np.unique(real_seg.reshape(-1, real_seg.shape[2]), axis=0)
|
|
|
164 |
st.session_state['unique_colors'] = unique_colors
|
165 |
# multiselect to choose multiple colors
|
166 |
chosen_colors = st.multiselect(
|
167 |
-
"Choose colors", list(unique_colors),
|
168 |
)
|
169 |
print(chosen_colors)
|
170 |
|
|
|
160 |
# get unique RGB colors from this segmentation map
|
161 |
st.image(Image.fromarray(real_seg), width=512)
|
162 |
print(real_seg.shape)
|
163 |
+
print(real_seg)
|
164 |
unique_colors = np.unique(real_seg.reshape(-1, real_seg.shape[2]), axis=0)
|
165 |
+
print(unique_colors)
|
166 |
st.session_state['unique_colors'] = unique_colors
|
167 |
# multiselect to choose multiple colors
|
168 |
chosen_colors = st.multiselect(
|
169 |
+
"Choose colors", list(unique_colors), key='unique_colors'
|
170 |
)
|
171 |
print(chosen_colors)
|
172 |
|