Spaces:
Runtime error
Runtime error
from transformers import pipeline | |
import gradio as gr | |
import spaces | |
pipe = pipeline("image-segmentation", model="briaai/RMBG-1.4", trust_remote_code=True) | |
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() | |