Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
2390d6e
1
Parent(s):
46304c9
Bump gradio to the latest version.
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: green
|
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
python_version: 3.10.13
|
| 8 |
-
sdk_version:
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
|
|
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
python_version: 3.10.13
|
| 8 |
+
sdk_version: 5.29.1
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
app.py
CHANGED
|
@@ -9,7 +9,6 @@ from glob import glob
|
|
| 9 |
from typing import Tuple
|
| 10 |
|
| 11 |
from PIL import Image
|
| 12 |
-
from gradio_imageslider import ImageSlider
|
| 13 |
from torchvision import transforms
|
| 14 |
|
| 15 |
import requests
|
|
@@ -217,7 +216,7 @@ tab_image = gr.Interface(
|
|
| 217 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 218 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 219 |
],
|
| 220 |
-
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
| 221 |
examples=examples,
|
| 222 |
api_name="image",
|
| 223 |
description=descriptions,
|
|
@@ -230,7 +229,7 @@ tab_text = gr.Interface(
|
|
| 230 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 231 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 232 |
],
|
| 233 |
-
outputs=ImageSlider(label="BiRefNet's prediction", type="pil"),
|
| 234 |
examples=examples_url,
|
| 235 |
api_name="URL",
|
| 236 |
description=descriptions+'\nTab-URL is partially modified from https://huggingface.co/spaces/not-lain/background-removal, thanks to this great work!',
|
|
@@ -251,7 +250,7 @@ tab_batch = gr.Interface(
|
|
| 251 |
demo = gr.TabbedInterface(
|
| 252 |
[tab_image, tab_text, tab_batch],
|
| 253 |
['image', 'URL', 'batch'],
|
| 254 |
-
title="
|
| 255 |
)
|
| 256 |
|
| 257 |
if __name__ == "__main__":
|
|
|
|
| 9 |
from typing import Tuple
|
| 10 |
|
| 11 |
from PIL import Image
|
|
|
|
| 12 |
from torchvision import transforms
|
| 13 |
|
| 14 |
import requests
|
|
|
|
| 216 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 217 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 218 |
],
|
| 219 |
+
outputs=gr.ImageSlider(label="BiRefNet's prediction", type="pil", format='png'),
|
| 220 |
examples=examples,
|
| 221 |
api_name="image",
|
| 222 |
description=descriptions,
|
|
|
|
| 229 |
gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `1024x1024`.", label="Resolution"),
|
| 230 |
gr.Radio(list(usage_to_weights_file.keys()), value='General', label="Weights", info="Choose the weights you want.")
|
| 231 |
],
|
| 232 |
+
outputs=gr.ImageSlider(label="BiRefNet's prediction", type="pil", format='png'),
|
| 233 |
examples=examples_url,
|
| 234 |
api_name="URL",
|
| 235 |
description=descriptions+'\nTab-URL is partially modified from https://huggingface.co/spaces/not-lain/background-removal, thanks to this great work!',
|
|
|
|
| 250 |
demo = gr.TabbedInterface(
|
| 251 |
[tab_image, tab_text, tab_batch],
|
| 252 |
['image', 'URL', 'batch'],
|
| 253 |
+
title="Official Online Demo of BiRefNet",
|
| 254 |
)
|
| 255 |
|
| 256 |
if __name__ == "__main__":
|