Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,6 @@ import os
|
|
| 5 |
import random
|
| 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()
|
|
@@ -19,7 +18,7 @@ def forward_gpu(ps, ref_s, speed):
|
|
| 19 |
return models[True](ps, ref_s, speed)
|
| 20 |
|
| 21 |
def generate_first(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
| 22 |
-
text = text
|
| 23 |
pipeline = pipelines[voice[0]]
|
| 24 |
pack = pipeline.load_voice(voice)
|
| 25 |
use_gpu = use_gpu and CUDA_AVAILABLE
|
|
|
|
| 5 |
import random
|
| 6 |
import torch
|
| 7 |
|
|
|
|
| 8 |
CHAR_LIMIT = None
|
| 9 |
|
| 10 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
|
|
|
| 18 |
return models[True](ps, ref_s, speed)
|
| 19 |
|
| 20 |
def generate_first(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
| 21 |
+
text = text
|
| 22 |
pipeline = pipelines[voice[0]]
|
| 23 |
pack = pipeline.load_voice(voice)
|
| 24 |
use_gpu = use_gpu and CUDA_AVAILABLE
|