hivecorp commited on
Commit
022a24f
·
verified ·
1 Parent(s): 287842f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,7 +49,7 @@ def tokenize_first(text, voice='af_heart'):
49
  return words # Return a list of words
50
 
51
  def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
52
- text = text if CHAR_LIMIT is None else text.strip()[:CHAR_LIMIT]
53
  pipeline = pipelines[voice[0]]
54
  pack = pipeline.load_voice(voice)
55
  use_gpu = use_gpu and CUDA_AVAILABLE
@@ -189,7 +189,7 @@ with gr.Blocks() as app:
189
  with gr.Column():
190
  gr.TabbedInterface([generate_tab], ['Generate'])
191
  random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
192
- generate_btn.click(fn=generate_first, inputs=[text, voice, speed, use_gpu], outputs=[out_audio, out_ps], api_name=API_NAME)
193
  tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
194
  predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
195
 
 
49
  return words # Return a list of words
50
 
51
  def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
52
+ text = text
53
  pipeline = pipelines[voice[0]]
54
  pack = pipeline.load_voice(voice)
55
  use_gpu = use_gpu and CUDA_AVAILABLE
 
189
  with gr.Column():
190
  gr.TabbedInterface([generate_tab], ['Generate'])
191
  random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
192
+ generate_btn.click(fn=generate_all, inputs=[text, voice, speed, use_gpu], outputs=[out_audio, out_ps], api_name=API_NAME)
193
  tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
194
  predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
195