bg-removal / old.py
EF
add python package: rembg
f54abe6
raw
history blame contribute delete
554 Bytes
import gradio as gr
from gradio.components import Textbox, Slider, Image
from rembg import remove
import numpy as np
def remove_background(input_img):
output_img = remove(input_img)
return output_img
with gr.Blocks(theme=gr.themes.Soft()) as demo:
gr.Interface(remove_background,
gr.Image(shape=(200, 200)),
"image",
# title='Ultrasound Analysis: Background Removal',
# description='Demo'
)
# demo.launch()
demo.launch(share=True)