lenML commited on
Commit
ebb7e04
·
verified ·
1 Parent(s): 353f94c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -172,8 +172,9 @@ with gr.Blocks(css=css) as demo:
172
  with gr.Column():
173
  with gr.Row():
174
  image_1 = gr.Image(label="image 1", type="pil", interactive=True)
175
- image_2 = gr.Image(label="image 2", type="pil", interactive=True)
176
- image_3 = gr.Image(label="image 3", type="pil", interactive=True)
 
177
 
178
  with gr.Column():
179
  result = gr.Image(label="Result", type="pil", interactive=False)
@@ -181,13 +182,16 @@ with gr.Blocks(css=css) as demo:
181
  use_output_btn = gr.Button("↗️ Use as image 1", variant="secondary", size="sm", visible=False)
182
 
183
  with gr.Row():
184
- prompt = gr.Text(
185
- label="Prompt",
186
- show_label=False,
187
- placeholder="describe the edit instruction",
188
- container=False,
189
- )
190
- run_button = gr.Button("Edit!", variant="primary")
 
 
 
191
 
192
  with gr.Accordion("Advanced Settings", open=False):
193
  # Negative prompt UI element is removed here
@@ -239,7 +243,7 @@ with gr.Blocks(css=css) as demo:
239
  # gr.Examples(examples=examples, inputs=[prompt], outputs=[result, seed], fn=infer, cache_examples=False)
240
 
241
  gr.on(
242
- triggers=[run_button.click, prompt.submit],
243
  fn=infer,
244
  inputs=[
245
  image_1,
 
172
  with gr.Column():
173
  with gr.Row():
174
  image_1 = gr.Image(label="image 1", type="pil", interactive=True)
175
+ with gr.Accordion("More references"):
176
+ image_2 = gr.Image(label="image 2", type="pil", interactive=True)
177
+ image_3 = gr.Image(label="image 3", type="pil", interactive=True)
178
 
179
  with gr.Column():
180
  result = gr.Image(label="Result", type="pil", interactive=False)
 
182
  use_output_btn = gr.Button("↗️ Use as image 1", variant="secondary", size="sm", visible=False)
183
 
184
  with gr.Row():
185
+ with gr.Row():
186
+ prompt = gr.Text(
187
+ label="Prompt",
188
+ show_label=False,
189
+ placeholder="describe the edit instruction",
190
+ container=False,
191
+ lines=5
192
+ )
193
+ with gr.Row():
194
+ run_button = gr.Button("Edit!", variant="primary")
195
 
196
  with gr.Accordion("Advanced Settings", open=False):
197
  # Negative prompt UI element is removed here
 
243
  # gr.Examples(examples=examples, inputs=[prompt], outputs=[result, seed], fn=infer, cache_examples=False)
244
 
245
  gr.on(
246
+ triggers=[run_button.click],
247
  fn=infer,
248
  inputs=[
249
  image_1,