not-lain's picture
first commit
95a864c
raw
history blame
No virus
345 Bytes
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()