Spaces:
Running
on
Zero
Running
on
Zero
πwπ
Browse files
app.py
CHANGED
@@ -2,19 +2,11 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
import spaces
|
4 |
|
5 |
-
pipe = pipeline(
|
6 |
-
"image-segmentation",
|
7 |
-
model="briaai/RMBG-1.4",
|
8 |
-
revision="refs/pr/9",
|
9 |
-
trust_remote_code=True,
|
10 |
-
)
|
11 |
-
|
12 |
|
13 |
@spaces.GPU
|
14 |
def predict(image_path):
|
15 |
-
pipe(image_path
|
16 |
-
return "myout.png"
|
17 |
-
|
18 |
|
19 |
gr.Interface(
|
20 |
predict,
|
|
|
2 |
import gradio as gr
|
3 |
import spaces
|
4 |
|
5 |
+
pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
@spaces.GPU
|
8 |
def predict(image_path):
|
9 |
+
return pipe(image_path)
|
|
|
|
|
10 |
|
11 |
gr.Interface(
|
12 |
predict,
|