Spaces:
Sleeping
Sleeping
BertChristiaens
commited on
Merge branch 'main' of hf.co:spaces/controlnet-interior-design/controlnet-seg
Browse files
app.py
CHANGED
@@ -200,6 +200,13 @@ def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, pain
|
|
200 |
unique_colors = [tuple(color) for color in unique_colors]
|
201 |
st.session_state['unique_colors'] = unique_colors
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
chosen_colors = st.multiselect(
|
204 |
label="Choose which concepts you want to regenerate in the image",
|
205 |
options=st.session_state['unique_colors'],
|
@@ -207,12 +214,6 @@ def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, pain
|
|
207 |
default=st.session_state['unique_colors'],
|
208 |
format_func=map_colors_rgb,
|
209 |
)
|
210 |
-
with st.expander("Explanation", expanded=False):
|
211 |
-
st.write("This mode allows you to choose which objects you want to re-generate in the image. "
|
212 |
-
"Use the selection dropdown to add or remove objects. If you are ready, press the generate button"
|
213 |
-
" to generate the image, which can take up to 30 seconds. If you want to improve the generated image, click"
|
214 |
-
" the 'move image to input' button."
|
215 |
-
)
|
216 |
|
217 |
if st.button("generate image", key='generate_button'):
|
218 |
image = get_image()
|
|
|
200 |
unique_colors = [tuple(color) for color in unique_colors]
|
201 |
st.session_state['unique_colors'] = unique_colors
|
202 |
|
203 |
+
with st.expander("Explanation", expanded=True):
|
204 |
+
st.write("This mode allows you to choose which objects you want to re-generate in the image. "
|
205 |
+
"Use the selection dropdown to add or remove objects. If you are ready, press the generate button"
|
206 |
+
" to generate the image, which can take up to 30 seconds. If you want to improve the generated image, click"
|
207 |
+
" the 'move image to input' button."
|
208 |
+
)
|
209 |
+
|
210 |
chosen_colors = st.multiselect(
|
211 |
label="Choose which concepts you want to regenerate in the image",
|
212 |
options=st.session_state['unique_colors'],
|
|
|
214 |
default=st.session_state['unique_colors'],
|
215 |
format_func=map_colors_rgb,
|
216 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
if st.button("generate image", key='generate_button'):
|
219 |
image = get_image()
|