Set text clear into delete_buton
Browse files- app.py +5 -5
- icons/{copy.svg → paste.svg} +0 -0
app.py
CHANGED
|
@@ -347,8 +347,8 @@ def remove_all_files():
|
|
| 347 |
command = f"rm -r vocals"
|
| 348 |
os.system(command)
|
| 349 |
|
| 350 |
-
#
|
| 351 |
-
#
|
| 352 |
|
| 353 |
def reset_frontend():
|
| 354 |
visible = False
|
|
@@ -615,8 +615,8 @@ def subtify():
|
|
| 615 |
gr.Markdown(html_subtify_logo)
|
| 616 |
with gr.Row(variant="panel"):
|
| 617 |
url_textbox = gr.Textbox(placeholder="Add video URL here", label="Video URL", elem_id="video_url", scale=1, interactive=True)
|
| 618 |
-
#
|
| 619 |
-
delete_button = gr.Button(size="sm", icon="icons/delete.svg", value="", min_width="10px", scale=0)
|
| 620 |
|
| 621 |
visible = False
|
| 622 |
auxiliar_block1 = gr.Textbox(label="Auxiliar block 1", elem_id="auxiliar_block1", interactive=False, visible=visible)
|
|
@@ -646,7 +646,7 @@ def subtify():
|
|
| 646 |
subtitled_video = gr.Video(label="Subtitled video", elem_id="subtitled_video", visible=visible, interactive=visible)
|
| 647 |
|
| 648 |
# Events
|
| 649 |
-
#
|
| 650 |
delete_button.click(
|
| 651 |
fn=reset_frontend,
|
| 652 |
outputs=[
|
|
|
|
| 347 |
command = f"rm -r vocals"
|
| 348 |
os.system(command)
|
| 349 |
|
| 350 |
+
# def paste_url_from_clipboard():
|
| 351 |
+
# return pyperclip.paste()
|
| 352 |
|
| 353 |
def reset_frontend():
|
| 354 |
visible = False
|
|
|
|
| 615 |
gr.Markdown(html_subtify_logo)
|
| 616 |
with gr.Row(variant="panel"):
|
| 617 |
url_textbox = gr.Textbox(placeholder="Add video URL here", label="Video URL", elem_id="video_url", scale=1, interactive=True)
|
| 618 |
+
# paste_button = gr.Button(size="sm", icon="icons/paste.svg", value="paste", min_width="10px", scale=0)
|
| 619 |
+
delete_button = gr.Button(size="sm", icon="icons/delete.svg", value="clear", min_width="10px", scale=0)
|
| 620 |
|
| 621 |
visible = False
|
| 622 |
auxiliar_block1 = gr.Textbox(label="Auxiliar block 1", elem_id="auxiliar_block1", interactive=False, visible=visible)
|
|
|
|
| 646 |
subtitled_video = gr.Video(label="Subtitled video", elem_id="subtitled_video", visible=visible, interactive=visible)
|
| 647 |
|
| 648 |
# Events
|
| 649 |
+
# paste_button.click(fn=paste_url_from_clipboard, outputs=url_textbox)
|
| 650 |
delete_button.click(
|
| 651 |
fn=reset_frontend,
|
| 652 |
outputs=[
|
icons/{copy.svg → paste.svg}
RENAMED
|
File without changes
|