Florian Lux commited on
Commit
ed7f208
β€’
1 Parent(s): e5cab28

fix incorrect order of operations

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +2 -2
app.py CHANGED
@@ -27,12 +27,12 @@ def float2pcm(sig, dtype='int16'):
27
  class TTS_Interface:
28
 
29
  def __init__(self):
30
- self.device = "cuda" if torch.cuda.is_available() else "cpu"
31
- self.model = Meta_FastSpeech2(device=self.device)
32
  os.makedirs("Models/HiFiGAN_combined", exist_ok=True)
33
  os.makedirs("Models/FastSpeech2_Meta", exist_ok=True)
34
  gdown.download(url="https://drive.google.com/uc?id=1-AhjmCR6DDI6rtzPIn9ksOxQyHKf6CbG", output="Models/FastSpeech2_Meta/best.pt")
35
  gdown.download(url="https://drive.google.com/uc?id=1-5sP-0JDUvKTjxhO3hUVJgArSUjuhU6P", output="Models/HiFiGAN_combined/best.pt")
 
 
36
 
37
  def read(self, prompt, language):
38
  language_id_lookup = {
 
27
  class TTS_Interface:
28
 
29
  def __init__(self):
 
 
30
  os.makedirs("Models/HiFiGAN_combined", exist_ok=True)
31
  os.makedirs("Models/FastSpeech2_Meta", exist_ok=True)
32
  gdown.download(url="https://drive.google.com/uc?id=1-AhjmCR6DDI6rtzPIn9ksOxQyHKf6CbG", output="Models/FastSpeech2_Meta/best.pt")
33
  gdown.download(url="https://drive.google.com/uc?id=1-5sP-0JDUvKTjxhO3hUVJgArSUjuhU6P", output="Models/HiFiGAN_combined/best.pt")
34
+ self.device = "cuda" if torch.cuda.is_available() else "cpu"
35
+ self.model = Meta_FastSpeech2(device=self.device)
36
 
37
  def read(self, prompt, language):
38
  language_id_lookup = {
requirements.txt CHANGED
@@ -18,7 +18,6 @@ emoji~=1.4.2
18
  filelock~=3.0.12
19
  ftfy~=6.0.3
20
  future~=0.18.2
21
- gdown~=3.13.0
22
  graphviz~=0.17
23
  huggingface-hub~=0.0.16
24
  HyperPyYAML~=1.0.0
@@ -82,4 +81,5 @@ urllib3~=1.26.6
82
  wcwidth~=0.2.5
83
  wincertstore~=0.2
84
  gradio
85
- jinja2
 
 
18
  filelock~=3.0.12
19
  ftfy~=6.0.3
20
  future~=0.18.2
 
21
  graphviz~=0.17
22
  huggingface-hub~=0.0.16
23
  HyperPyYAML~=1.0.0
 
81
  wcwidth~=0.2.5
82
  wincertstore~=0.2
83
  gradio
84
+ jinja2
85
+ gdown