img_removing / app.py
hahangmi's picture
Create app.py
458410b verified
raw
history blame
576 Bytes
import gradio as gr
def remove_background(image):
# 여기에 배경을 제거하는 코드를 구현합니다.
# 예시로, 입력된 이미지를 그대로 반환하는 가상의 함수를 사용합니다.
# 실제로는 여기에 모델을 호출하는 코드가 들어갑니다.
return image
with gr.Blocks() as demo:
with gr.Row():
image_input = gr.Image(tool="editor")
image_output = gr.Image()
image_input.change(fn=remove_background, inputs=image_input, outputs=image_output)
if __name__ == "__main__":
demo.launch()