Spaces:
Runtime error
Runtime error
Commit ·
6a46ded
1
Parent(s): 9ff56a4
add ex
Browse files149 unmodified lines150151152153154153154155156112 unmodified lines26927027127327227327427528 unmodified lines304305306308307308309310313311312313149 unmodified lines st.write("#### Output image") st.image(output_image, width=512) if st.button("Move to input image"): move_image('output_image', 'initial_image', remove_state=False, rerun=False) move_image('output_image', 'input_image', remove_state=True, rerun=True) move_image('output_image', 'initial_image', remove_state=True, rerun=True)
def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, paint_mode): st.write("#### Input image")112 unmodified lines input_image, generation_mode, brush, color_chooser, paint_mode = make_sidebar()
# check if there is an input_image if not ('input_image' in st.session_state and st.session_state['input_image'] is not None): if not ('initial_image' in st.session_state and st.session_state['initial_image'] is not None): st.success("Upload an image to start") st.write("Welcome to the interior design controlnet demo! " "You can start by uploading a picture of your room, after which you will see "28 unmodified lines with col_im_0: st.image(st.session_state['example_image_0'], caption="Example image 1", use_column_width=True) if st.button("Use example 1"): move_image('example_image_0', 'input_image', remove_state=True, rerun=False) move_image('example_image_0', 'initial_image', remove_state=True, rerun=True) with col_im_1: st.image(st.session_state['example_image_1'], caption="Example image 2", use_column_width=True) if st.button("Use example 2"): move_image('example_image_1', 'input_image', remove_state=True, rerun=False) move_image('example_image_1', 'initial_image', remove_state=True, rerun=True) st.write("## Generated examples")app.py+2-5