Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import os
|
|
| 5 |
import random
|
| 6 |
import torch
|
| 7 |
|
| 8 |
-
IS_DUPLICATE = not os.getenv('SPACE_ID', '').startswith('
|
| 9 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
| 10 |
if not IS_DUPLICATE:
|
| 11 |
import kokoro
|
|
@@ -148,7 +148,7 @@ with gr.Blocks() as generate_tab:
|
|
| 148 |
STREAM_NOTE = ['⚠️ There is an unknown Gradio bug that might yield no audio the first time you click `Stream`.']
|
| 149 |
if CHAR_LIMIT is not None:
|
| 150 |
STREAM_NOTE.append(f'✂️ Each stream is capped at {CHAR_LIMIT} characters.')
|
| 151 |
-
STREAM_NOTE.append('🚀 Want more characters? You can [use Qhash-TTS directly](https://huggingface.co/
|
| 152 |
STREAM_NOTE = '\n\n'.join(STREAM_NOTE)
|
| 153 |
|
| 154 |
with gr.Blocks() as stream_tab:
|
|
@@ -161,11 +161,11 @@ with gr.Blocks() as stream_tab:
|
|
| 161 |
gr.DuplicateButton()
|
| 162 |
|
| 163 |
BANNER_TEXT = '''
|
| 164 |
-
[***Qhash-TTS*** **is an open-weight TTS model with 82 million parameters.**](https://huggingface.co/
|
| 165 |
|
| 166 |
This demo only showcases English, but you can directly use the model to access other languages.
|
| 167 |
'''
|
| 168 |
-
API_OPEN = os.getenv('SPACE_ID') != '
|
| 169 |
API_NAME = None if API_OPEN else False
|
| 170 |
with gr.Blocks() as app:
|
| 171 |
with gr.Row():
|
|
|
|
| 5 |
import random
|
| 6 |
import torch
|
| 7 |
|
| 8 |
+
IS_DUPLICATE = not os.getenv('SPACE_ID', '').startswith('Quantumhash/')
|
| 9 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
| 10 |
if not IS_DUPLICATE:
|
| 11 |
import kokoro
|
|
|
|
| 148 |
STREAM_NOTE = ['⚠️ There is an unknown Gradio bug that might yield no audio the first time you click `Stream`.']
|
| 149 |
if CHAR_LIMIT is not None:
|
| 150 |
STREAM_NOTE.append(f'✂️ Each stream is capped at {CHAR_LIMIT} characters.')
|
| 151 |
+
STREAM_NOTE.append('🚀 Want more characters? You can [use Qhash-TTS directly](https://huggingface.co/Quantumhash/Qhash-TTS) or duplicate this space:')
|
| 152 |
STREAM_NOTE = '\n\n'.join(STREAM_NOTE)
|
| 153 |
|
| 154 |
with gr.Blocks() as stream_tab:
|
|
|
|
| 161 |
gr.DuplicateButton()
|
| 162 |
|
| 163 |
BANNER_TEXT = '''
|
| 164 |
+
[***Qhash-TTS*** **is an open-weight TTS model with 82 million parameters.**](https://huggingface.co/Quantumhash/Qhash-TTS)
|
| 165 |
|
| 166 |
This demo only showcases English, but you can directly use the model to access other languages.
|
| 167 |
'''
|
| 168 |
+
API_OPEN = os.getenv('SPACE_ID') != 'Quantumhash/Qhash-TTS'
|
| 169 |
API_NAME = None if API_OPEN else False
|
| 170 |
with gr.Blocks() as app:
|
| 171 |
with gr.Row():
|