Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,21 +2,19 @@ import spaces
|
|
| 2 |
import gradio as gr
|
| 3 |
from transparent_background import Remover
|
| 4 |
|
| 5 |
-
|
| 6 |
@spaces.GPU
|
| 7 |
def remove_background(image):
|
| 8 |
remover = Remover()
|
| 9 |
output = remover.process(image)
|
| 10 |
return output
|
| 11 |
|
| 12 |
-
|
| 13 |
iface = gr.Interface(
|
| 14 |
fn=remove_background,
|
| 15 |
-
inputs=gr.
|
| 16 |
-
outputs=gr.
|
| 17 |
title="Background Remover",
|
| 18 |
-
description="Upload an image and get the background removed."
|
| 19 |
)
|
| 20 |
|
| 21 |
if __name__ == "__main__":
|
| 22 |
-
iface.launch()
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
from transparent_background import Remover
|
| 4 |
|
|
|
|
| 5 |
@spaces.GPU
|
| 6 |
def remove_background(image):
|
| 7 |
remover = Remover()
|
| 8 |
output = remover.process(image)
|
| 9 |
return output
|
| 10 |
|
|
|
|
| 11 |
iface = gr.Interface(
|
| 12 |
fn=remove_background,
|
| 13 |
+
inputs=gr.Image(label="Upload Image"),
|
| 14 |
+
outputs=gr.Image(label="Output Image"),
|
| 15 |
title="Background Remover",
|
| 16 |
+
description="Upload an image and get the background removed."
|
| 17 |
)
|
| 18 |
|
| 19 |
if __name__ == "__main__":
|
| 20 |
+
iface.launch()
|