esun-choi commited on
Commit
a1b3e87
·
1 Parent(s): c9c8399

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -8
app.py CHANGED
@@ -1,11 +1,19 @@
1
  import gradio as gr
2
  from main import main
3
 
4
- iface = gr.Interface(
5
- fn=main,
6
- inputs=gr.Image(type="filepath", label="Invoice Image"),
7
- outputs=gr.Image(type="pil", label="Masked Invoice Image"),
8
- live=True
9
- )
10
-
11
- iface.launch()
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from main import main
3
 
4
+
5
+ def main(image):
6
+ return image
7
+
8
+ with gr.Blocks(title="Privacy Mask", css="footer{display:none !important}") as demo:
9
+
10
+ with gr.Row():
11
+ image_input = gr.Image(type="filepath", label="Invoice Image")
12
+ image_output = gr.Image(show_download_button=True, type="pil", label="Masked Invoice Image")
13
+
14
+ with gr.Row():
15
+ image_button = gr.Button("Masking")
16
+ image_button.click(main, inputs=image_input, outputs=image_output)
17
+ clear_button = gr.ClearButton([image_input, image_output])
18
+
19
+ demo.launch()