hahangmi commited on
Commit
458410b
·
verified ·
1 Parent(s): fbdb4ff

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def remove_background(image):
4
+ # 여기에 배경을 제거하는 코드를 구현합니다.
5
+ # 예시로, 입력된 이미지를 그대로 반환하는 가상의 함수를 사용합니다.
6
+ # 실제로는 여기에 모델을 호출하는 코드가 들어갑니다.
7
+ return image
8
+
9
+ with gr.Blocks() as demo:
10
+ with gr.Row():
11
+ image_input = gr.Image(tool="editor")
12
+ image_output = gr.Image()
13
+
14
+ image_input.change(fn=remove_background, inputs=image_input, outputs=image_output)
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch()