Maximo Fernandez
commited on
Commit
·
b6e899f
1
Parent(s):
7ffa44b
Add more components and url text change event
Browse files
app.py
CHANGED
@@ -386,8 +386,8 @@ language_dict = union_language_dict()
|
|
386 |
# gr.Video(visible=visible),
|
387 |
# )
|
388 |
|
389 |
-
|
390 |
-
|
391 |
|
392 |
# def get_youtube_thumbnail(url):
|
393 |
# yt = YouTube(url)
|
@@ -712,14 +712,14 @@ def subtify():
|
|
712 |
number_of_speakers = gr.Dropdown(visible=visible, label="Number of speakers", show_label=True, value=10, choices=num_speaker, scale=1, interactive=True, info="Number of speakers in the video, if you don't know, select 10")
|
713 |
subtify_button = gr.Button(size="lg", value="subtify", min_width="10px", scale=0, visible=visible)
|
714 |
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
|
724 |
# original_audio_path = gr.Textbox(label="Original audio path", elem_id="original_audio_path", visible=visible)
|
725 |
# original_video_path = gr.Textbox(label="Original video path", elem_id="original_video_path", visible=visible)
|
@@ -750,10 +750,10 @@ def subtify():
|
|
750 |
# subtitled_video,
|
751 |
# ]
|
752 |
# )
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
# auxiliar_block1.change(
|
758 |
# fn=is_valid_url,
|
759 |
# inputs=url_textbox,
|
|
|
386 |
# gr.Video(visible=visible),
|
387 |
# )
|
388 |
|
389 |
+
def show_auxiliar_block1():
|
390 |
+
return gr.Textbox(value="URL checked", visible=False)
|
391 |
|
392 |
# def get_youtube_thumbnail(url):
|
393 |
# yt = YouTube(url)
|
|
|
712 |
number_of_speakers = gr.Dropdown(visible=visible, label="Number of speakers", show_label=True, value=10, choices=num_speaker, scale=1, interactive=True, info="Number of speakers in the video, if you don't know, select 10")
|
713 |
subtify_button = gr.Button(size="lg", value="subtify", min_width="10px", scale=0, visible=visible)
|
714 |
|
715 |
+
auxiliar_block2 = gr.Textbox(placeholder="Waiting", label="Auxiliar block 2", elem_id="auxiliar_block2", interactive=False, visible=visible)
|
716 |
+
with gr.Row():
|
717 |
+
video_donwloaded_progress_info = gr.Textbox(placeholder="Waiting", label="Video download progress info", elem_id="video_donwloaded_progress_info", interactive=False, visible=visible)
|
718 |
+
video_sliced_progress_info = gr.Textbox(placeholder="Waiting", label="Video slice progress info", elem_id="video_sliced_progress_info", interactive=False, visible=visible)
|
719 |
+
video_transcribed_progress_info = gr.Textbox(placeholder="Waiting", label="Transcribe progress info", elem_id="video_transcribed_progress_info", interactive=False, visible=visible)
|
720 |
+
transcriptions_concatenated_progress_info = gr.Textbox(placeholder="Waiting", label="Concatenate progress info", elem_id="transcriptions_concatenated_progress_info", interactive=False, visible=visible)
|
721 |
+
video_translated_progress_info = gr.Textbox(placeholder="Waiting", label="Translate progress info", elem_id="transcription_translated_progress_info", interactive=False, visible=visible)
|
722 |
+
video_subtitled_progress_info = gr.Textbox(placeholder="Waiting", label="Video subtitle progress info", elem_id="video_subtitled_progress_info", interactive=False, visible=visible)
|
723 |
|
724 |
# original_audio_path = gr.Textbox(label="Original audio path", elem_id="original_audio_path", visible=visible)
|
725 |
# original_video_path = gr.Textbox(label="Original video path", elem_id="original_video_path", visible=visible)
|
|
|
750 |
# subtitled_video,
|
751 |
# ]
|
752 |
# )
|
753 |
+
url_textbox.change(
|
754 |
+
fn=show_auxiliar_block1,
|
755 |
+
outputs=[auxiliar_block1]
|
756 |
+
)
|
757 |
# auxiliar_block1.change(
|
758 |
# fn=is_valid_url,
|
759 |
# inputs=url_textbox,
|