Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr committed Feb 6, 2024
1 parent 7b5517c commit 740068e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions demo_gpt4v_som.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ class ImageMask(gr.templates.Sketchpad):
Sets: source="canvas", tool="sketch"
"""

is_template = True

def __init__(self, **kwargs):
super().__init__(sources=["upload"], interactive=True, **kwargs)

Expand All @@ -191,7 +189,7 @@ def preprocess(self, x):
'''

demo = gr.Blocks()
image = ImageMask(label="Input", type="pil", brush_radius=20.0, brush_color="#FFFFFF", height=512)
image = ImageMask(label="Input", type="pil", height=512)
# image = gr.Image(label="Input", type="pil", height=512)
slider = gr.Slider(1, 3, value=1.8, label="Granularity") # info="Choose in [1, 1.5), [1.5, 2.5), [2.5, 3] for [seem, semantic-sam (multi-level), sam]"
mode = gr.Radio(['Automatic', 'Interactive', ], value='Automatic', label="Segmentation Mode")
Expand Down
4 changes: 1 addition & 3 deletions demo_som.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ class ImageMask(gr.templates.Sketchpad):
Sets: source="canvas", tool="sketch"
"""

is_template = True

def __init__(self, **kwargs):
super().__init__(sources=["upload"], interactive=True, **kwargs)

Expand All @@ -139,7 +137,7 @@ def preprocess(self, x):
'''

demo = gr.Blocks()
image = ImageMask(label="Input", type="pil", brush_radius=20.0, brush_color="#FFFFFF")
image = ImageMask(label="Input", type="pil")
slider = gr.Slider(1, 3, value=2, label="Granularity", info="Choose in [1, 1.5), [1.5, 2.5), [2.5, 3] for [seem, semantic-sam (multi-level), sam]")
mode = gr.Radio(['Automatic', 'Interactive', ], value='Automatic', label="Segmentation Mode")
image_out = gr.Image(label="Auto generation",type="pil")
Expand Down

0 comments on commit 740068e

Please sign in to comment.