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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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 if CHAR_LIMIT is None else text.strip()[:CHAR_LIMIT]
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