ohayonguy
commited on
Commit
·
1483b57
1
Parent(s):
189975d
added clear button
Browse files
app.py
CHANGED
|
@@ -269,13 +269,20 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 269 |
aligned = gr.Checkbox(label="The input is an aligned face image.", value=False)
|
| 270 |
|
| 271 |
with gr.Row():
|
| 272 |
-
|
|
|
|
|
|
|
|
|
|
| 273 |
|
| 274 |
with gr.Row():
|
| 275 |
result = gr.Image(label="Output", type="numpy", show_label=True)
|
| 276 |
with gr.Row():
|
| 277 |
gallery = gr.Gallery(label="Restored faces gallery", type="numpy", show_label=True)
|
| 278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
examples = gr.Examples(
|
| 280 |
examples=[
|
| 281 |
[42, False, "examples/01.png", False, 1, 25],
|
|
|
|
| 269 |
aligned = gr.Checkbox(label="The input is an aligned face image.", value=False)
|
| 270 |
|
| 271 |
with gr.Row():
|
| 272 |
+
with gr.Column(scale=1):
|
| 273 |
+
run_button = gr.Button(value="Submit", variant="primary")
|
| 274 |
+
with gr.Column(scale=1):
|
| 275 |
+
clear_button = gr.ClearButton(value="Clear")
|
| 276 |
|
| 277 |
with gr.Row():
|
| 278 |
result = gr.Image(label="Output", type="numpy", show_label=True)
|
| 279 |
with gr.Row():
|
| 280 |
gallery = gr.Gallery(label="Restored faces gallery", type="numpy", show_label=True)
|
| 281 |
|
| 282 |
+
clear_button.add(input_im)
|
| 283 |
+
clear_button.add(result)
|
| 284 |
+
clear_button.add(gallery)
|
| 285 |
+
|
| 286 |
examples = gr.Examples(
|
| 287 |
examples=[
|
| 288 |
[42, False, "examples/01.png", False, 1, 25],
|