Maximo Fernandez commited on
Commit
7ffa44b
·
1 Parent(s): ad19414

Add image component

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  import torch
6
  from time import sleep
7
  from tqdm import tqdm
8
- # from lang_list import union_language_dict
9
  # # import pyperclip
10
  # from pytube import YouTube
11
  # import re
@@ -186,7 +186,7 @@ html_buy_me_a_coffe = '''
186
  </div>
187
  '''
188
 
189
- # language_dict = union_language_dict()
190
 
191
  # def subtify_no_ui():
192
  # number_works = 6
@@ -701,16 +701,16 @@ def subtify():
701
  delete_button = gr.Button(size="sm", icon="icons/delete.svg", value="clear", min_width="10px", scale=0)
702
 
703
  visible = False
704
- # auxiliar_block1 = gr.Textbox(label="Auxiliar block 1", elem_id="auxiliar_block1", interactive=False, visible=visible)
705
- # with gr.Row(equal_height=False):
706
- # image = gr.Image(visible=visible, scale=1)
707
- # with gr.Column():
708
- # with gr.Row():
709
- # source_languaje = gr.Dropdown(visible=visible, label="Source languaje", show_label=True, value="English", choices=language_dict, scale=1, interactive=True, info="Language of the video")
710
- # target_languaje = gr.Dropdown(visible=visible, label="Target languaje", show_label=True, value="Español", choices=language_dict, scale=1, interactive=True, info="Language to translate the subtitles")
711
- # with gr.Accordion("Advanced settings", open=False, visible=visible) as Advanced_setings:
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():
 
5
  import torch
6
  from time import sleep
7
  from tqdm import tqdm
8
+ from lang_list import union_language_dict
9
  # # import pyperclip
10
  # from pytube import YouTube
11
  # import re
 
186
  </div>
187
  '''
188
 
189
+ language_dict = union_language_dict()
190
 
191
  # def subtify_no_ui():
192
  # number_works = 6
 
701
  delete_button = gr.Button(size="sm", icon="icons/delete.svg", value="clear", min_width="10px", scale=0)
702
 
703
  visible = False
704
+ auxiliar_block1 = gr.Textbox(label="Auxiliar block 1", elem_id="auxiliar_block1", interactive=False, visible=visible)
705
+ with gr.Row(equal_height=False):
706
+ image = gr.Image(visible=visible, scale=1)
707
+ with gr.Column():
708
+ with gr.Row():
709
+ source_languaje = gr.Dropdown(visible=visible, label="Source languaje", show_label=True, value="English", choices=language_dict, scale=1, interactive=True, info="Language of the video")
710
+ target_languaje = gr.Dropdown(visible=visible, label="Target languaje", show_label=True, value="Español", choices=language_dict, scale=1, interactive=True, info="Language to translate the subtitles")
711
+ with gr.Accordion("Advanced settings", open=False, visible=visible) as Advanced_setings:
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():