Spaces:
Runtime error
Runtime error
xinlongwang
commited on
Commit
·
4b455f2
1
Parent(s):
72e357f
Update app.py
Browse files
app.py
CHANGED
@@ -53,14 +53,13 @@ examples = [
|
|
53 |
['./images/rainbow_1.jpg', './images/rainbow_2.jpg', './images/rainbow_3.jpg'],
|
54 |
['./images/earth_1.jpg', './images/earth_2.jpg', './images/earth_3.jpg'],
|
55 |
['./images/obj_1.jpg', './images/obj_2.jpg', './images/obj_3.jpg'],
|
56 |
-
['./images/xray_1.jpg', './images/xray_2.jpg', './images/xray_3.jpg'],
|
57 |
['./images/ydt_2.jpg', './images/ydt_1.jpg', './images/ydt_3.jpg'],
|
58 |
]
|
59 |
|
60 |
demo_mask = gr.Interface(fn=inference_mask1,
|
61 |
inputs=[gr.ImageMask(brush_radius=8, label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
|
62 |
#outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
|
63 |
-
outputs=[gr.Image(label="output1 (输出图1)").style(height=
|
64 |
#outputs=gr.Gallery(label="outputs (输出图)"),
|
65 |
examples=examples,
|
66 |
#title="SegGPT for Any Segmentation<br>(Painter Inside)",
|
@@ -70,8 +69,8 @@ demo_mask = gr.Interface(fn=inference_mask1,
|
|
70 |
1. Upload images to be tested to 'img1' and/or 'img2'. <br>2. Upload a prompt image to 'prompt' and draw a mask. <br>\
|
71 |
Tips: The more accurate you annotate, the more accurate the model predicts.;) <br>\
|
72 |
<br> \
|
73 |
-
|
74 |
-
|
75 |
</p>",
|
76 |
cache_examples=False,
|
77 |
allow_flagging="never",
|
|
|
53 |
['./images/rainbow_1.jpg', './images/rainbow_2.jpg', './images/rainbow_3.jpg'],
|
54 |
['./images/earth_1.jpg', './images/earth_2.jpg', './images/earth_3.jpg'],
|
55 |
['./images/obj_1.jpg', './images/obj_2.jpg', './images/obj_3.jpg'],
|
|
|
56 |
['./images/ydt_2.jpg', './images/ydt_1.jpg', './images/ydt_3.jpg'],
|
57 |
]
|
58 |
|
59 |
demo_mask = gr.Interface(fn=inference_mask1,
|
60 |
inputs=[gr.ImageMask(brush_radius=8, label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
|
61 |
#outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
|
62 |
+
outputs=[gr.Image(label="output1 (输出图1)").style(height=256, width=256), gr.Image(label="output2 (输出图2)").style(height=256, width=256)],
|
63 |
#outputs=gr.Gallery(label="outputs (输出图)"),
|
64 |
examples=examples,
|
65 |
#title="SegGPT for Any Segmentation<br>(Painter Inside)",
|
|
|
69 |
1. Upload images to be tested to 'img1' and/or 'img2'. <br>2. Upload a prompt image to 'prompt' and draw a mask. <br>\
|
70 |
Tips: The more accurate you annotate, the more accurate the model predicts.;) <br>\
|
71 |
<br> \
|
72 |
+
💎 Examples below were never trained and are randomly selected for testing in the wild. <br>\
|
73 |
+
💎 Current UI interface just unleashes a small part of the capabilities of SegGPT, i.e., 1-shot case. \
|
74 |
</p>",
|
75 |
cache_examples=False,
|
76 |
allow_flagging="never",
|