Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -23,8 +23,27 @@ def segment(image, labels):
|
|
23 |
|
24 |
|
25 |
gr.Interface(
|
|
|
26 |
fn=segment,
|
27 |
-
inputs=[
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
).launch()
|
|
|
23 |
|
24 |
|
25 |
gr.Interface(
|
26 |
+
title='LSeg: Language-driven Semantic Segmentation',
|
27 |
fn=segment,
|
28 |
+
inputs=[
|
29 |
+
gr.Image(),
|
30 |
+
gr.Textbox(placeholder='other\ncat', lines=5, max_lines=50),
|
31 |
+
],
|
32 |
+
outputs=[
|
33 |
+
gr.Gallery().style(grid=[2, 3], height="auto")
|
34 |
+
],
|
35 |
+
article='''## More
|
36 |
+
* There are more interesting models in [PaddleHub](https://github.com/PaddlePaddle/PaddleHub), you can star [PaddleHub](https://github.com/PaddlePaddle/PaddleHub) to follow.
|
37 |
+
|
38 |
+
* Besides, you can use free GPU resourses in [AIStudio](https://aistudio.baidu.com/aistudio/projectdetail/4580391) to enjoy more cases, have fun.
|
39 |
+
|
40 |
+
[![](https://user-images.githubusercontent.com/22424850/187849103-074cb6d2-a9b4-49a1-b1f0-fc130049769f.png)](https://github.com/PaddlePaddle/PaddleHub/stargazers)
|
41 |
+
|
42 |
+
## References
|
43 |
+
* Paper: [Language-driven Semantic Segmentation](https://arxiv.org/abs/2201.03546)
|
44 |
+
|
45 |
+
* Offical Code: [isl-org/lang-seg](https://github.com/isl-org/lang-seg)
|
46 |
+
''',
|
47 |
+
examples=[['cat.jpeg', 'other\ncat']],
|
48 |
+
cache_examples=True
|
49 |
).launch()
|
cat.jpeg
ADDED
test.jpg
DELETED
Binary file (243 kB)
|
|