Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import utils
|
3 |
+
|
4 |
+
with gr.Blocks() as app:
|
5 |
+
with gr.Tab("Add Watermark"):
|
6 |
+
with gr.Row():
|
7 |
+
with gr.Column():
|
8 |
+
inp_im = gr.Image(label="Input Image")
|
9 |
+
inp_mark = gr.Textbox(label="Watermark")
|
10 |
+
mark_btn = gr.Button()
|
11 |
+
msg_box = gr.Textbox(label="System Message")
|
12 |
+
with gr.Column():
|
13 |
+
out_im = gr.Image(label="Watermarked Image")
|
14 |
+
mark_btn.click(utils.encode,[inp_im,inp_mark],[out_im,msg_box])
|
15 |
+
app.launch()
|