Spaces:
Runtime error
Runtime error
Johannes
commited on
Commit
·
90d0892
1
Parent(s):
c220fc4
add imageslider dependencies
Browse files- app.py +2 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
from PIL import Image, ImageDraw
|
| 3 |
from transparent_background import Remover
|
| 4 |
import numpy as np
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
def resize(img: Image, target_size_px: int):
|
|
@@ -54,6 +55,6 @@ gr.Interface(
|
|
| 54 |
It uses the [transparent-background](https://github.com/plemeri/transparent-background) library, which is built on [InSPyReNet](https://github.com/plemeri/inspyrenet).
|
| 55 |
""",
|
| 56 |
inputs=gr.components.Image(type="pil", label="Input Image"),
|
| 57 |
-
outputs=
|
| 58 |
title="Salient Object Detection",
|
| 59 |
).launch()
|
|
|
|
| 2 |
from PIL import Image, ImageDraw
|
| 3 |
from transparent_background import Remover
|
| 4 |
import numpy as np
|
| 5 |
+
from gradio_imageslider import ImageSlider
|
| 6 |
|
| 7 |
|
| 8 |
def resize(img: Image, target_size_px: int):
|
|
|
|
| 55 |
It uses the [transparent-background](https://github.com/plemeri/transparent-background) library, which is built on [InSPyReNet](https://github.com/plemeri/inspyrenet).
|
| 56 |
""",
|
| 57 |
inputs=gr.components.Image(type="pil", label="Input Image"),
|
| 58 |
+
outputs=ImageSlider(label="Output", type="pil"),
|
| 59 |
title="Salient Object Detection",
|
| 60 |
).launch()
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
transparent-background
|
| 2 |
-
numpy<2
|
|
|
|
|
|
| 1 |
transparent-background
|
| 2 |
+
numpy<2
|
| 3 |
+
gradio_imageslider
|