atatakun commited on
Commit
3a0b4ea
β€’
1 Parent(s): 364ea41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -242,7 +242,7 @@ def inpaint(image, invert):
242
 
243
  def predict(im):
244
  # return im["composite"]
245
- return im["background"]
246
 
247
  block = gr.Blocks().queue()
248
  with block:
@@ -269,7 +269,7 @@ with block:
269
  gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγˆγ‚‹γ‚ˆγ†γ«γͺγ‚ŠγΎγ—γŸ")
270
  with gr.Row():
271
  with gr.Column():
272
- input_image = gr.ImageMask(sources="upload", type="numpy", height="auto")
273
  im_preview = gr.Image()
274
  input_image.change(predict, outputs=im_preview, inputs=input_image, show_progress="hidden")
275
  # input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))
 
242
 
243
  def predict(im):
244
  # return im["composite"]
245
+ return im["inputmask"]
246
 
247
  block = gr.Blocks().queue()
248
  with block:
 
269
  gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγˆγ‚‹γ‚ˆγ†γ«γͺγ‚ŠγΎγ—γŸ")
270
  with gr.Row():
271
  with gr.Column():
272
+ input_image = gr.ImageMask(sources="upload", type="numpy", height="auto", elem_id="inputmask")
273
  im_preview = gr.Image()
274
  input_image.change(predict, outputs=im_preview, inputs=input_image, show_progress="hidden")
275
  # input_image = gr.ImageEditor(sources="upload", type="numpy", height="auto", layers="False", brush=gr.Brush(colors=["#000000"]))