Florian Lux commited on
Commit
690ae68
β€’
1 Parent(s): b2cc7fa

clearly it's too late to use a brain

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,9 +29,9 @@ class TTS_Interface:
29
  def __init__(self):
30
  os.makedirs("Models/HiFiGAN_combined", exist_ok=True)
31
  os.makedirs("Models/FastSpeech2_Meta", exist_ok=True)
32
- if os.path.exists("Models/FastSpeech2_Meta/best.pt"):
33
  gdown.download(id="1-AhjmCR6DDI6rtzPIn9ksOxQyHKf6CbG", output="Models/FastSpeech2_Meta/best.pt")
34
- if os.path.exists("Models/HiFiGAN_combined/best.pt"):
35
  gdown.download(id="1-5sP-0JDUvKTjxhO3hUVJgArSUjuhU6P", output="Models/HiFiGAN_combined/best.pt")
36
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
37
  self.model = Meta_FastSpeech2(device=self.device)
 
29
  def __init__(self):
30
  os.makedirs("Models/HiFiGAN_combined", exist_ok=True)
31
  os.makedirs("Models/FastSpeech2_Meta", exist_ok=True)
32
+ if not os.path.exists("Models/FastSpeech2_Meta/best.pt"):
33
  gdown.download(id="1-AhjmCR6DDI6rtzPIn9ksOxQyHKf6CbG", output="Models/FastSpeech2_Meta/best.pt")
34
+ if not os.path.exists("Models/HiFiGAN_combined/best.pt"):
35
  gdown.download(id="1-5sP-0JDUvKTjxhO3hUVJgArSUjuhU6P", output="Models/HiFiGAN_combined/best.pt")
36
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
37
  self.model = Meta_FastSpeech2(device=self.device)