not-lain commited on
Commit
075a6c0
β€’
1 Parent(s): 87614d2

🌘wπŸŒ–

Browse files
Files changed (1) hide show
  1. app.py +2 -10
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, out_name="myout.png")
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,