justin-zk commited on
Commit
e4ffef1
·
1 Parent(s): a15eeed

update app

Browse files
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -13,20 +13,6 @@ from show import *
13
  from per_segment_anything import sam_model_registry, SamPredictor
14
 
15
 
16
- class ImageMask(gr.components.Image):
17
- """
18
- Sets: source="canvas", tool="sketch"
19
- """
20
-
21
- is_template = True
22
-
23
- def __init__(self, **kwargs):
24
- super().__init__(source="upload", tool="sketch", interactive=True, **kwargs)
25
-
26
- def preprocess(self, x):
27
- return super().preprocess(x)
28
-
29
-
30
  class Mask_Weights(nn.Module):
31
  def __init__(self):
32
  super().__init__()
@@ -504,7 +490,7 @@ main = gr.Interface(
504
  main_scribble = gr.Interface(
505
  fn=inference_scribble,
506
  inputs=[
507
- ImageMask(label="[Stroke] Draw on Image", brush_radius=4),
508
  gr.Image(label="test image1"),
509
  gr.Image(label="test image2"),
510
  ],
 
13
  from per_segment_anything import sam_model_registry, SamPredictor
14
 
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  class Mask_Weights(nn.Module):
17
  def __init__(self):
18
  super().__init__()
 
490
  main_scribble = gr.Interface(
491
  fn=inference_scribble,
492
  inputs=[
493
+ gr.ImageMask(label="[Stroke] Draw on Image", brush_radius=4),
494
  gr.Image(label="test image1"),
495
  gr.Image(label="test image2"),
496
  ],