not-lain's picture
🌘wπŸŒ–
075a6c0 verified
raw
history blame contribute delete
No virus
391 Bytes
from transformers import pipeline
import gradio as gr
import spaces
pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True)
@spaces.GPU
def predict(image_path):
return pipe(image_path)
gr.Interface(
predict,
gr.Image(type="filepath"),
"image",
examples=[["./hafedh purple.jpg"], ["./gigachad.webp"]],
cache_examples=True,
).launch()