LPX55 commited on
Commit
89690a8
·
verified ·
1 Parent(s): 46dcd1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -415,7 +415,6 @@ title = """<h1 align="center">Diffusers Image Outpaint</h1>
415
  </p>
416
  </div>
417
  """
418
- sam_block = gr.load(name="spaces/LPX55/SAM2_1-Image-Predictor-Masking-Tool-CPU")
419
 
420
  with gr.Blocks(css=css, fill_height=True) as demo:
421
  gr.Markdown("# Diffusers Inpaint and Outpaint")
@@ -438,7 +437,6 @@ with gr.Blocks(css=css, fill_height=True) as demo:
438
  with gr.Row():
439
  run_button = gr.Button("Generate")
440
  paste_back = gr.Checkbox(True, label="Paste back original")
441
- sam_block()
442
  with gr.Row(equal_height=False):
443
  input_image = gr.ImageMask(
444
  type="pil", label="Input Image", layers=True
@@ -593,7 +591,7 @@ with gr.Blocks(css=css, fill_height=True) as demo:
593
  # )
594
  with gr.TabItem("SAM2.1 Segmented Mask"):
595
  with gr.Blocks() as sam_demo:
596
- sam2_mask.demo.render()
597
  # Define the action triggered by the upload_image_input change
598
  # upload_image_input.change(
599
  # fn=update_mask,
 
415
  </p>
416
  </div>
417
  """
 
418
 
419
  with gr.Blocks(css=css, fill_height=True) as demo:
420
  gr.Markdown("# Diffusers Inpaint and Outpaint")
 
437
  with gr.Row():
438
  run_button = gr.Button("Generate")
439
  paste_back = gr.Checkbox(True, label="Paste back original")
 
440
  with gr.Row(equal_height=False):
441
  input_image = gr.ImageMask(
442
  type="pil", label="Input Image", layers=True
 
591
  # )
592
  with gr.TabItem("SAM2.1 Segmented Mask"):
593
  with gr.Blocks() as sam_demo:
594
+ sam_block = gr.load(name="spaces/LPX55/SAM2_1-Image-Predictor-Masking-Tool-CPU")
595
  # Define the action triggered by the upload_image_input change
596
  # upload_image_input.change(
597
  # fn=update_mask,