Spaces:
Running
on
Zero
Running
on
Zero
from transformers import pipeline | |
import gradio as gr | |
pipe = pipeline( | |
"image-segmentation", | |
model="briaai/RMBG-1.4", | |
revision="refs/pr/9", | |
trust_remote_code=True, | |
) | |
def predict(image_path): | |
pipe(image_path, out_name="myout.png") | |
return "myout.png" | |
gr.Interface(predict, gr.Image(type="filepath"), "image").launch() | |