Spaces:
Running
on
Zero
Running
on
Zero
ZhengPeng7
commited on
Commit
•
9f09c5a
1
Parent(s):
4c18769
Move the descriptions out of TabbedInferface.
Browse files
app.py
CHANGED
@@ -121,7 +121,11 @@ tab_image = gr.Interface(
|
|
121 |
],
|
122 |
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
123 |
examples=examples,
|
124 |
-
api_name="image"
|
|
|
|
|
|
|
|
|
125 |
)
|
126 |
|
127 |
tab_text = gr.Interface(
|
@@ -133,17 +137,13 @@ tab_text = gr.Interface(
|
|
133 |
],
|
134 |
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
135 |
examples=examples_url,
|
136 |
-
api_name="text"
|
137 |
)
|
138 |
|
139 |
demo = gr.TabbedInterface(
|
140 |
[tab_image, tab_text],
|
141 |
["image", "text"],
|
142 |
title="BiRefNet demo for subject extraction (general / salient / camouflaged / portrait).",
|
143 |
-
description=('Upload a picture, our model will extract a highly accurate segmentation of the subject in it.\n)'
|
144 |
-
' The resolution used in our training was `1024x1024`, thus the suggested resolution to obtain good results!\n'
|
145 |
-
' Our codes can be found at https://github.com/ZhengPeng7/BiRefNet.\n'
|
146 |
-
' We also maintain the HF model of BiRefNet at https://huggingface.co/ZhengPeng7/BiRefNet for easier access.')
|
147 |
)
|
148 |
|
149 |
if __name__ == "__main__":
|
|
|
121 |
],
|
122 |
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
123 |
examples=examples,
|
124 |
+
api_name="image",
|
125 |
+
description=('Upload a picture, our model will extract a highly accurate segmentation of the subject in it.\n)'
|
126 |
+
' The resolution used in our training was `1024x1024`, thus the suggested resolution to obtain good results!\n'
|
127 |
+
' Our codes can be found at https://github.com/ZhengPeng7/BiRefNet.\n'
|
128 |
+
' We also maintain the HF model of BiRefNet at https://huggingface.co/ZhengPeng7/BiRefNet for easier access.'),
|
129 |
)
|
130 |
|
131 |
tab_text = gr.Interface(
|
|
|
137 |
],
|
138 |
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
139 |
examples=examples_url,
|
140 |
+
api_name="text",
|
141 |
)
|
142 |
|
143 |
demo = gr.TabbedInterface(
|
144 |
[tab_image, tab_text],
|
145 |
["image", "text"],
|
146 |
title="BiRefNet demo for subject extraction (general / salient / camouflaged / portrait).",
|
|
|
|
|
|
|
|
|
147 |
)
|
148 |
|
149 |
if __name__ == "__main__":
|