Download app.py from sungdo1/soon: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/sungdo1/soon/resolve/main/app.py
- Command line
-
hf download hf://spaces/sungdo1/soon/app.py
-
curl -L -o app.py https://huggingface.co/spaces/sungdo1/soon/resolve/main/app.py
403 Bytes
| import gradio as gr | |
| from rembg import remove | |
| def remove_background(image): | |
| output_image = remove(image) | |
| return output_image | |
| with gr.Blocks() as demo: | |
| with gr.Row(): | |
| image_input = gr.Image(type="pil") | |
| image_output = gr.Image(type="pil") | |
| image_input.change(fn=remove_background, inputs=image_input, outputs=image_output) | |
| if __name__ == "__main__": | |
| demo.launch() |