Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
e26a926
1
Parent(s):
1ff61c1
open examples option. Specify the gradio version to enable the dragging on example images.
Browse files- app.py +2 -2
- requirements.txt +2 -2
app.py
CHANGED
@@ -61,7 +61,7 @@ def pred_maps(image_1, image_2, image_3, image_4):
|
|
61 |
|
62 |
|
63 |
N = 4
|
64 |
-
|
65 |
|
66 |
ipt = [gr.Image().style(width=600, height=150) for _ in range(N)]
|
67 |
opt = [gr.Image().style(width=600, height=150) for _ in range(N)]
|
@@ -69,7 +69,7 @@ demo = gr.Interface(
|
|
69 |
fn=pred_maps,
|
70 |
inputs=ipt,
|
71 |
outputs=opt,
|
72 |
-
|
73 |
interpretation='default',
|
74 |
title='Online demo for `GCoNet+: A Stronger Group Collaborative Co-Salient Object Detector (T-PAMI 2023)`',
|
75 |
description='Upload pictures, most of which contain salient objects of the same class. Our demo will give you the binary maps of these co-salient objects :)\n**********Example images need to be dropped into each block, instead of click.**********'
|
|
|
61 |
|
62 |
|
63 |
N = 4
|
64 |
+
examples = [[_] for _ in glob('example_images/butterfly/*')][:N]
|
65 |
|
66 |
ipt = [gr.Image().style(width=600, height=150) for _ in range(N)]
|
67 |
opt = [gr.Image().style(width=600, height=150) for _ in range(N)]
|
|
|
69 |
fn=pred_maps,
|
70 |
inputs=ipt,
|
71 |
outputs=opt,
|
72 |
+
examples=examples,
|
73 |
interpretation='default',
|
74 |
title='Online demo for `GCoNet+: A Stronger Group Collaborative Co-Salient Object Detector (T-PAMI 2023)`',
|
75 |
description='Upload pictures, most of which contain salient objects of the same class. Our demo will give you the binary maps of these co-salient objects :)\n**********Example images need to be dropped into each block, instead of click.**********'
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
|
|
1 |
torch==1.13.1
|
2 |
torchvision==0.14.1
|
3 |
opencv-python
|
4 |
-
fvcore
|
5 |
-
scikit-image
|
|
|
1 |
+
gradio==3.22.1
|
2 |
torch==1.13.1
|
3 |
torchvision==0.14.1
|
4 |
opencv-python
|
5 |
+
fvcore
|
|