niulx commited on
Commit
de2e588
·
verified ·
1 Parent(s): 0381f4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -189,6 +189,10 @@ with gr.Blocks() as demo:
189
  with gr.Tab(label="d-edit"):
190
  with gr.Row():
191
  with gr.Column():
 
 
 
 
192
  canvas = gr.Image(value = "./img.png", type="numpy", label="Draw Mask", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
193
  gr.Markdown("""<p style="text-align: left; font-size: 16px">Each image requires a single segmentation and optimization operation.<br>Afterwards, you can modify the mask ID and prompt for image editing. <br>The link of D-edit paper: https://arxiv.org/abs/2403.04880v2</p>""")
194
 
@@ -314,10 +318,7 @@ with gr.Blocks() as demo:
314
  gr.Info('Image editing completed.')
315
  return load_pil_img()
316
 
317
- example_inps = [['./img.png'],['./img2.png'],['./img3.png'],['./img4.png']]
318
- gr.Examples(examples=example_inps, inputs=[canvas],
319
- label='examples', cache_examples='lazy', outputs=[],
320
- fn=change_image)
321
 
322
 
323
  canvas.upload(image_change, inputs=[], outputs=[slider,add_button2])
 
189
  with gr.Tab(label="d-edit"):
190
  with gr.Row():
191
  with gr.Column():
192
+ example_inps = [['./img.png'],['./img2.png'],['./img3.png'],['./img4.png']]
193
+ gr.Examples(examples=example_inps, inputs=[canvas],
194
+ label='examples', cache_examples='lazy', outputs=[],
195
+ fn=change_image)
196
  canvas = gr.Image(value = "./img.png", type="numpy", label="Draw Mask", show_label=True, height=LENGTH, width=LENGTH, interactive=True)
197
  gr.Markdown("""<p style="text-align: left; font-size: 16px">Each image requires a single segmentation and optimization operation.<br>Afterwards, you can modify the mask ID and prompt for image editing. <br>The link of D-edit paper: https://arxiv.org/abs/2403.04880v2</p>""")
198
 
 
318
  gr.Info('Image editing completed.')
319
  return load_pil_img()
320
 
321
+
 
 
 
322
 
323
 
324
  canvas.upload(image_change, inputs=[], outputs=[slider,add_button2])