bg-remover / app.py
ecshreve's picture
Update app.py
16c0fa6 verified
raw
history blame contribute delete
522 Bytes
import gradio as gr
from rembg import remove
def process_image(input_img):
"""Processes an image by removing its background and resizing it."""
img = remove(input_img)
return img
with gr.Blocks() as demo:
gr.Interface(
fn=process_image,
inputs = [gr.Image(label="Input Image", interactive=True)],
outputs = gr.Image(label="Processed Image"),
examples=[["images/sample1.png"]],
title="📸 Image Background Remover")
if __name__ == "__main__":
demo.launch()