Spaces:
Running
on
Zero
Running
on
Zero
Serhiy Stetskovych
commited on
Commit
·
a257548
1
Parent(s):
086eb2f
Switch to hf model
Browse files- .gitattributes +0 -5
- infer.py +4 -1
.gitattributes
CHANGED
|
@@ -33,15 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
-
Utils/JDC/bst.t7 filter=lfs diff=lfs merge=lfs -text
|
| 37 |
-
Utils/PLBERT/step_410000.t7 filter=lfs diff=lfs merge=lfs -text
|
| 38 |
-
epoch_2nd_00027_filatov_whisp_cont.pth filter=lfs diff=lfs merge=lfs -text
|
| 39 |
-
Utils/ASR/epoch_00100.pth filter=lfs diff=lfs merge=lfs -text
|
| 40 |
weights/plbert.bin filter=lfs diff=lfs merge=lfs -text
|
| 41 |
weights/asr.bin filter=lfs diff=lfs merge=lfs -text
|
| 42 |
weights/filatov.bin filter=lfs diff=lfs merge=lfs -text
|
| 43 |
weights/jdc.bin filter=lfs diff=lfs merge=lfs -text
|
| 44 |
-
weights/multi.bin filter=lfs diff=lfs merge=lfs -text
|
| 45 |
voices/Олег[[:space:]]Лепенець.wav filter=lfs diff=lfs merge=lfs -text
|
| 46 |
voices/Слава[[:space:]]Красовська.wav filter=lfs diff=lfs merge=lfs -text
|
| 47 |
voices/Гаська[[:space:]]Шиян.wav filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
weights/plbert.bin filter=lfs diff=lfs merge=lfs -text
|
| 37 |
weights/asr.bin filter=lfs diff=lfs merge=lfs -text
|
| 38 |
weights/filatov.bin filter=lfs diff=lfs merge=lfs -text
|
| 39 |
weights/jdc.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 40 |
voices/Олег[[:space:]]Лепенець.wav filter=lfs diff=lfs merge=lfs -text
|
| 41 |
voices/Слава[[:space:]]Красовська.wav filter=lfs diff=lfs merge=lfs -text
|
| 42 |
voices/Гаська[[:space:]]Шиян.wav filter=lfs diff=lfs merge=lfs -text
|
infer.py
CHANGED
|
@@ -10,6 +10,7 @@ import numpy as np
|
|
| 10 |
np.random.seed(0)
|
| 11 |
import librosa
|
| 12 |
from copy import deepcopy
|
|
|
|
| 13 |
|
| 14 |
import spaces
|
| 15 |
import yaml
|
|
@@ -80,8 +81,10 @@ model_single = build_model(recursive_munch(config['model_params_single']), text_
|
|
| 80 |
model_multi = build_model(recursive_munch(config['model_params_multi']), deepcopy(text_aligner), deepcopy(pitch_extractor), deepcopy(plbert))
|
| 81 |
|
| 82 |
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
-
params_multi = torch.load('weights/multi.bin', map_location='cpu')
|
| 85 |
params_single = torch.load('weights/filatov.bin', map_location='cpu')
|
| 86 |
|
| 87 |
|
|
|
|
| 10 |
np.random.seed(0)
|
| 11 |
import librosa
|
| 12 |
from copy import deepcopy
|
| 13 |
+
from huggingface_hub import hf_hub_download
|
| 14 |
|
| 15 |
import spaces
|
| 16 |
import yaml
|
|
|
|
| 81 |
model_multi = build_model(recursive_munch(config['model_params_multi']), deepcopy(text_aligner), deepcopy(pitch_extractor), deepcopy(plbert))
|
| 82 |
|
| 83 |
|
| 84 |
+
multi_path = hf_hub_download(repo_id='patriotyk/styletts2_ukrainian_multispeaker', filename="pytorch_model.bin")
|
| 85 |
+
params_multi = torch.load(multi_path, map_location='cpu')
|
| 86 |
+
|
| 87 |
|
|
|
|
| 88 |
params_single = torch.load('weights/filatov.bin', map_location='cpu')
|
| 89 |
|
| 90 |
|