Spaces:
Running
Running
Florian Lux
commited on
Commit
·
b2cc7fa
1
Parent(s):
1d606bc
make gdown resume old downloads
Browse files
app.py
CHANGED
@@ -29,8 +29,10 @@ 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 |
-
|
33 |
-
|
|
|
|
|
34 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
35 |
self.model = Meta_FastSpeech2(device=self.device)
|
36 |
|
|
|
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)
|
38 |
|