hivecorp commited on
Commit
9220285
·
verified ·
1 Parent(s): 2b50ad7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -6,7 +6,7 @@ import random
6
  import torch
7
 
8
  IS_DUPLICATE = not os.getenv('SPACE_ID', '').startswith('hexgrad/')
9
- CHAR_LIMIT = None if IS_DUPLICATE else 500000
10
 
11
  CUDA_AVAILABLE = torch.cuda.is_available()
12
  models = {gpu: KModel().to('cuda' if gpu else 'cpu').eval() for gpu in [False] + ([True] if CUDA_AVAILABLE else [])}
@@ -164,8 +164,8 @@ with gr.Blocks() as generate_tab:
164
 
165
  BANNER_TEXT = '''
166
  [***Kokoro*** **is an open-weight TTS model with 82 million parameters.**](https://huggingface.co/hexgrad/Kokoro-82M)
167
- This is our work on Kokoro TTS [**V1 Model GPU**](https://shukdevdatta123-kokoro-tts-translate-gpu.hf.space) and the next version Kokoro TTS [**V2 Model CPU**](https://shukdevdatta123-kokoro-tts.hf.space).
168
- If you would like to use our V2 Model with GPU, then go to this [link](https://colab.research.google.com/drive/1DIpBzJSBBeTcpkyxkHcpngLumMapEWQz?usp=sharing).
169
  '''
170
 
171
  API_OPEN = os.getenv('SPACE_ID') != 'hexgrad/Kokoro-TTS'
@@ -190,7 +190,7 @@ with gr.Blocks() as app:
190
  with gr.Column():
191
  gr.TabbedInterface([generate_tab], ['Generate'])
192
  random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
193
- generate_btn.click(fn=generate_all, inputs=[text, voice, speed, use_gpu], outputs=[out_audio, out_ps], api_name=API_NAME)
194
  tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
195
  predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
196
 
 
6
  import torch
7
 
8
  IS_DUPLICATE = not os.getenv('SPACE_ID', '').startswith('hexgrad/')
9
+ CHAR_LIMIT = None
10
 
11
  CUDA_AVAILABLE = torch.cuda.is_available()
12
  models = {gpu: KModel().to('cuda' if gpu else 'cpu').eval() for gpu in [False] + ([True] if CUDA_AVAILABLE else [])}
 
164
 
165
  BANNER_TEXT = '''
166
  [***Kokoro*** **is an open-weight TTS model with 82 million parameters.**](https://huggingface.co/hexgrad/Kokoro-82M)
167
+ As of January 31st, 2025, Kokoro was the most-liked [**TTS model**](https://huggingface.co/models?pipeline_tag=text-to-speech&sort=likes) and the most-liked [**TTS space**](https://huggingface.co/spaces?sort=likes&search=tts) on Hugging Face.
168
+ This demo only showcases English, but you can directly use the model to access other languages.
169
  '''
170
 
171
  API_OPEN = os.getenv('SPACE_ID') != 'hexgrad/Kokoro-TTS'
 
190
  with gr.Column():
191
  gr.TabbedInterface([generate_tab], ['Generate'])
192
  random_btn.click(fn=get_random_text, inputs=[voice], outputs=[text], api_name=API_NAME)
193
+ generate_btn.click(fn=generate_first, inputs=[text, voice, speed, use_gpu], outputs=[out_audio, out_ps], api_name=API_NAME)
194
  tokenize_btn.click(fn=tokenize_first, inputs=[text, voice], outputs=[out_ps], api_name=API_NAME)
195
  predict_btn.click(fn=predict, inputs=[text, voice, speed], outputs=[out_audio], api_name=API_NAME)
196