hexgrad commited on
Commit
2e67085
·
verified ·
1 Parent(s): 5e9cc13

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -458,7 +458,15 @@ def extract_text(file):
458
  return '\n'.join([line for line in r])
459
  return None
460
 
461
- with gr.Blocks() as lf_tts:
 
 
 
 
 
 
 
 
462
  with gr.Row():
463
  with gr.Column():
464
  file_input = gr.File(file_types=['.pdf', '.txt'], label='Input File: pdf or txt')
@@ -485,15 +493,7 @@ with gr.Blocks() as lf_tts:
485
  speed = gr.Slider(minimum=0.5, maximum=2, value=1, step=0.1, label='⚡️ Speed', info='Adjust the speaking speed')
486
  trim = gr.Slider(minimum=0, maximum=24000, value=0, step=1000, label='✂️ Trim', info='Cut from both ends')
487
  pad_between = gr.Slider(minimum=0, maximum=24000, value=0, step=1000, label='🔇 Pad Between', info='How much silence to insert between segments')
488
- with gr.Row(css='''
489
- .square-stop-btn {
490
- aspect-ratio: 1/1;
491
- display: flex;
492
- align-items: center;
493
- justify-content: center;
494
- padding: 0;
495
- }
496
- '''):
497
  generate_btn = gr.Button('Generate x0', variant='secondary', interactive=False)
498
  stop_btn = gr.Button('■', variant='stop', elem_classes=['square-stop-btn'])
499
  with gr.Row():
 
458
  return '\n'.join([line for line in r])
459
  return None
460
 
461
+ with gr.Blocks(css='''
462
+ .square-stop-btn {
463
+ aspect-ratio: 1/1;
464
+ display: flex;
465
+ align-items: center;
466
+ justify-content: center;
467
+ padding: 0;
468
+ }
469
+ ''') as lf_tts:
470
  with gr.Row():
471
  with gr.Column():
472
  file_input = gr.File(file_types=['.pdf', '.txt'], label='Input File: pdf or txt')
 
493
  speed = gr.Slider(minimum=0.5, maximum=2, value=1, step=0.1, label='⚡️ Speed', info='Adjust the speaking speed')
494
  trim = gr.Slider(minimum=0, maximum=24000, value=0, step=1000, label='✂️ Trim', info='Cut from both ends')
495
  pad_between = gr.Slider(minimum=0, maximum=24000, value=0, step=1000, label='🔇 Pad Between', info='How much silence to insert between segments')
496
+ with gr.Row():
 
 
 
 
 
 
 
 
497
  generate_btn = gr.Button('Generate x0', variant='secondary', interactive=False)
498
  stop_btn = gr.Button('■', variant='stop', elem_classes=['square-stop-btn'])
499
  with gr.Row():