fix layout
Browse files
app.py
CHANGED
|
@@ -79,16 +79,18 @@ with gr.Blocks(title="Pillow Tool") as app:
|
|
| 79 |
srp_btn = gr.Button(value="Unsharp")
|
| 80 |
with gr.Accordion(label="Convolution filter", open=False):
|
| 81 |
ker_txt = gr.Textbox(label="Kernel", value="-1, -1, -1, -1, 9, -1, -1, -1, -1")
|
| 82 |
-
siz_txt = gr.Textbox(label="Size", value="3,3")
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
|
|
|
| 86 |
gr.HTML("</br>")
|
| 87 |
ker_btn = gr.Button(value="Convolution")
|
| 88 |
|
| 89 |
with gr.Column():
|
| 90 |
output_img = gr.Image(type="pil", label="Input image", interactive=False)
|
| 91 |
kpt_btn = gr.Button(value="Keep it", variant="primary")
|
|
|
|
| 92 |
|
| 93 |
bti_btn.click(filters_builtin, [input_img, drp_builtin], [output_img])
|
| 94 |
rad_btn.click(filters_radio, inputs=[input_img, rdi_builtin, blr_rad], outputs=[output_img])
|
|
|
|
| 79 |
srp_btn = gr.Button(value="Unsharp")
|
| 80 |
with gr.Accordion(label="Convolution filter", open=False):
|
| 81 |
ker_txt = gr.Textbox(label="Kernel", value="-1, -1, -1, -1, 9, -1, -1, -1, -1")
|
| 82 |
+
siz_txt = gr.Textbox(label="Kernel Size", value="3,3")
|
| 83 |
+
with gr.Row():
|
| 84 |
+
scl_txt = gr.Number(label="Scale", value=1)
|
| 85 |
+
ofs_txt = gr.Number(label="Offset", value=0)
|
| 86 |
+
itr_txt = gr.Number(label="Iterations", value=1, minimum=1, maximum=10)
|
| 87 |
gr.HTML("</br>")
|
| 88 |
ker_btn = gr.Button(value="Convolution")
|
| 89 |
|
| 90 |
with gr.Column():
|
| 91 |
output_img = gr.Image(type="pil", label="Input image", interactive=False)
|
| 92 |
kpt_btn = gr.Button(value="Keep it", variant="primary")
|
| 93 |
+
gr.ClearButton(components=[input_img, output_img])
|
| 94 |
|
| 95 |
bti_btn.click(filters_builtin, [input_img, drp_builtin], [output_img])
|
| 96 |
rad_btn.click(filters_radio, inputs=[input_img, rdi_builtin, blr_rad], outputs=[output_img])
|