Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,19 @@
|
|
1 |
import gradio as gr
|
2 |
from main import main
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|