Spaces:
Running
Running
Commit
·
f20b422
1
Parent(s):
e53817f
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ sam = sam_model_registry[model_type](checkpoint="./tinysam/tinysam.pth")
|
|
14 |
predictor = SamPredictor(sam)
|
15 |
|
16 |
examples = [
|
17 |
-
["assets/1.jpg"],
|
18 |
["assets/2.jpg"],
|
19 |
["assets/3.jpg"],
|
20 |
["assets/4.jpeg"],
|
@@ -82,7 +82,6 @@ with gr.Blocks(css=css, title="TinySAM") as demo:
|
|
82 |
with gr.Column():
|
83 |
im = gr.ImageEditor(
|
84 |
type="pil",
|
85 |
-
value=default_example[0]
|
86 |
)
|
87 |
output = gr.AnnotatedImage()
|
88 |
with gr.Row():
|
@@ -90,7 +89,7 @@ with gr.Blocks(css=css, title="TinySAM") as demo:
|
|
90 |
gr.Markdown("Try some of the examples below ⬇️")
|
91 |
gr.Examples(
|
92 |
examples=examples,
|
93 |
-
inputs=
|
94 |
examples_per_page=6,
|
95 |
)
|
96 |
|
|
|
14 |
predictor = SamPredictor(sam)
|
15 |
|
16 |
examples = [
|
17 |
+
[os.path.join(os.path.dirname(__file__), "assets/1.jpg")],
|
18 |
["assets/2.jpg"],
|
19 |
["assets/3.jpg"],
|
20 |
["assets/4.jpeg"],
|
|
|
82 |
with gr.Column():
|
83 |
im = gr.ImageEditor(
|
84 |
type="pil",
|
|
|
85 |
)
|
86 |
output = gr.AnnotatedImage()
|
87 |
with gr.Row():
|
|
|
89 |
gr.Markdown("Try some of the examples below ⬇️")
|
90 |
gr.Examples(
|
91 |
examples=examples,
|
92 |
+
inputs=im,
|
93 |
examples_per_page=6,
|
94 |
)
|
95 |
|