Spaces:
Sleeping
Sleeping
Commit ·
c53fc43
1
Parent(s): b054e3b
renaming
Browse files105 unmodified lines1061071081091101111121131141151161179 unmodified lines12712812913013113213333 unmodified lines16716816917017117217318 unmodified lines19219319419519619719882 unmodified lines28128228328428528628775 unmodified lines363364365366367368369370371105 unmodified linesdef make_sidebar():with st.sidebar:input_image = st.file_uploader("", type=["png", "jpg"], key='input_image', on_change=on_upload)generation_mode = st.selectbox("Generation mode", ["Re-generate objects","Segmentation conditioning","Inpainting"], on_change=on_change_radio)if generation_mode == "Segmentation conditioning":paint_mode = st.sidebar.selectbox("Painting mode", ("freedraw", "polygon"))if paint_mode == "freedraw":brush = st.slider("Stroke width", 5, 140, 100, key='slider_seg')9 unmodified lines"Choose a color", chosen_colors, index=0, format_func=map_colors, key='color_chooser')elif generation_mode == "Re-generate objects":color_chooser = "rgba(0, 0, 0, 0.0)"paint_mode = 'freedraw'brush = 033 unmodified linesbrush=brush,_reset_state=_reset_state)if generation_mode == "Segmentation conditioning":canvas = st_canvas(**canvas_dict,)18 unmodified linesst.session_state['output_image'] = result_imageelif generation_mode == "Re-generate objects":canvas = st_canvas(**canvas_dict,)82 unmodified linesst.write("Welcome to the interior design controlnet demo! ""You can start by uploading a picture of your room, after which you will see ""a good variety of options to edit your current room to generate the room of your dreams! ""You can choose between inpainting, segmentation conditioning and re-generating objects, which ""use our custom trained controlnet model.")with st.expander("Useful information", expanded=True):75 unmodified linesif generation_mode == "Inpainting":make_inpainting_explanation()elif generation_mode == "Segmentation conditioning":make_segmentation_explanation()elif generation_mode == "Re-generate objects":make_regeneration_explanation()col1, col2 = st.columns(2)105 unmodified lines1061071081091101111121131141151161179 unmodified lines12712812913013113213333 unmodified lines16716816917017117217318 unmodified lines19219319419519619719882 unmodified lines28128228328428528628775 unmodified lines363364365366367368369370371105 unmodified linesdef make_sidebar():with st.sidebar:input_image = st.file_uploader("", type=["png", "jpg"], key='input_image', on_change=on_upload)generation_mode = st.selectbox("Generation mode", ["Regenerate","Segmentation","Inpainting"], on_change=on_change_radio)if generation_mode == "Segmentation":paint_mode = st.sidebar.selectbox("Painting mode", ("freedraw", "polygon"))if paint_mode == "freedraw":brush = st.slider("Stroke width", 5, 140, 100, key='slider_seg')9 unmodified lines"Choose a color", chosen_colors, index=0, format_func=map_colors, key='color_chooser')elif generation_mode == "Regenerate":color_chooser = "rgba(0, 0, 0, 0.0)"paint_mode = 'freedraw'brush = 033 unmodified linesbrush=brush,_reset_state=_reset_state)if generation_mode == "Segmentation":canvas = st_canvas(**canvas_dict,)18 unmodified linesst.session_state['output_image'] = result_imageelif generation_mode == "Regenerate":canvas = st_canvas(**canvas_dict,)82 unmodified linesst.write("Welcome to the interior design controlnet demo! ""You can start by uploading a picture of your room, after which you will see ""a good variety of options to edit your current room to generate the room of your dreams! ""You can choose between inpainting, Segmentation and re-generating objects, which ""use our custom trained controlnet model.")with st.expander("Useful information", expanded=True):75 unmodified linesif generation_mode == "Inpainting":make_inpainting_explanation()elif generation_mode == "Segmentation":make_segmentation_explanation()elif generation_mode == "Regenerate":make_regeneration_explanation()col1, col2 = st.columns(2)
app.py+9-9