Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -332,8 +332,8 @@ with gr.Blocks() as basic_tts:
|
|
332 |
btn = gr.Button(list(CHOICES.values())[i*4+j], variant='primary' if i*4+j < 10 else 'secondary')
|
333 |
btn.click(lambda v, b: f'{v}+{b}' if v.startswith(b[:2]) else b, inputs=[voice, btn], outputs=[voice])
|
334 |
voice.change(lambda v, b: gr.Button(b, variant='primary' if v.startswith(b[:2]) else 'secondary'), inputs=[voice, btn], outputs=[btn])
|
335 |
-
text.submit(generate, inputs=[text, voice, in_ps, speed, trim, use_gpu
|
336 |
-
generate_btn.click(generate, inputs=[text, voice, in_ps, speed, trim, use_gpu
|
337 |
|
338 |
@torch.no_grad()
|
339 |
def lf_forward(token_lists, voices, speed, device='cpu'):
|
@@ -595,7 +595,6 @@ with gr.Blocks() as app:
|
|
595 |
[basic_tts, lf_tts, about, changelog],
|
596 |
['🔥 Basic TTS', '📖 Long Form', 'ℹ️ About', '📝 Changelog'],
|
597 |
)
|
598 |
-
app.load(lambda r: r.session_hash, None, sk)
|
599 |
|
600 |
if __name__ == '__main__':
|
601 |
app.queue(api_open=True).launch()
|
|
|
332 |
btn = gr.Button(list(CHOICES.values())[i*4+j], variant='primary' if i*4+j < 10 else 'secondary')
|
333 |
btn.click(lambda v, b: f'{v}+{b}' if v.startswith(b[:2]) else b, inputs=[voice, btn], outputs=[voice])
|
334 |
voice.change(lambda v, b: gr.Button(b, variant='primary' if v.startswith(b[:2]) else 'secondary'), inputs=[voice, btn], outputs=[btn])
|
335 |
+
text.submit(generate, inputs=[text, voice, in_ps, speed, trim, use_gpu], outputs=[audio, out_ps])
|
336 |
+
generate_btn.click(generate, inputs=[text, voice, in_ps, speed, trim, use_gpu], outputs=[audio, out_ps])
|
337 |
|
338 |
@torch.no_grad()
|
339 |
def lf_forward(token_lists, voices, speed, device='cpu'):
|
|
|
595 |
[basic_tts, lf_tts, about, changelog],
|
596 |
['🔥 Basic TTS', '📖 Long Form', 'ℹ️ About', '📝 Changelog'],
|
597 |
)
|
|
|
598 |
|
599 |
if __name__ == '__main__':
|
600 |
app.queue(api_open=True).launch()
|