multimodalart HF staff commited on
Commit
da9710b
1 Parent(s): 1e24c47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -88,29 +88,29 @@ with gr.Blocks(css=css) as demo:
88
  This Space demonstrates MultiDiffusion region-based generation using Stable Diffusion model. To get started, draw your masks and type your prompts. More details in the [project page](https://multidiffusion.github.io).
89
  ![Examples](https://multidiffusion.github.io/pics/tight.jpg)
90
  ''')
91
- with gr.Box(elem_id="main-image"):
92
- #with gr.Accordion(open=True, label="Your color sketch") as sketch_accordion:
93
- with gr.Row():
94
  with gr.Column():
95
- with gr.Row():
96
- image = gr.Image(interactive=True, tool="color-sketch", source="canvas", type="pil")
97
- with gr.Row():
98
- aspect = gr.Radio(["Square", "Horizontal", "Vertical"], value="Square", label="Aspect Ratio")
99
- button_run = gr.Button("I've finished my sketch",elem_id="main_button")
100
-
101
- prompts = []
102
- colors = []
103
- color_row = [None] * MAX_COLORS
104
- with gr.Column(visible=False) as post_sketch:
105
- general_prompt = gr.Textbox(label="General Prompt")
106
- for n in range(MAX_COLORS):
107
- with gr.Row(visible=False) as color_row[n]:
108
- with gr.Box(elem_id="color-bg"):
109
- colors.append(gr.HTML('<div class="color-bg-item" style="background-color: black"></div>'))
110
- prompts.append(gr.Textbox(label="Prompt for this color"))
111
- final_run_btn = gr.Button("Generate!")
112
- with gr.Column():
113
- out_image = gr.Image()
114
 
115
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
116
 
 
88
  This Space demonstrates MultiDiffusion region-based generation using Stable Diffusion model. To get started, draw your masks and type your prompts. More details in the [project page](https://multidiffusion.github.io).
89
  ![Examples](https://multidiffusion.github.io/pics/tight.jpg)
90
  ''')
91
+ with gr.Row():
92
+ with gr.Box(elem_id="main-image"):
93
+ #with gr.Accordion(open=True, label="Your color sketch") as sketch_accordion:
94
  with gr.Column():
95
+ with gr.Row():
96
+ image = gr.Image(interactive=True, tool="color-sketch", source="canvas", type="pil")
97
+ with gr.Row():
98
+ aspect = gr.Radio(["Square", "Horizontal", "Vertical"], value="Square", label="Aspect Ratio")
99
+ button_run = gr.Button("I've finished my sketch",elem_id="main_button")
100
+
101
+ prompts = []
102
+ colors = []
103
+ color_row = [None] * MAX_COLORS
104
+ with gr.Column(visible=False) as post_sketch:
105
+ general_prompt = gr.Textbox(label="General Prompt")
106
+ for n in range(MAX_COLORS):
107
+ with gr.Row(visible=False) as color_row[n]:
108
+ with gr.Box(elem_id="color-bg"):
109
+ colors.append(gr.HTML('<div class="color-bg-item" style="background-color: black"></div>'))
110
+ prompts.append(gr.Textbox(label="Prompt for this color"))
111
+ final_run_btn = gr.Button("Generate!")
112
+
113
+ out_image = gr.Image()
114
 
115
  css_height = gr.HTML("<style>#main-image{width: 512px} .fixed-height{height: 512px !important}</style>")
116