Update README.md
Browse files
README.md
CHANGED
@@ -46,6 +46,7 @@ This model can generate realistic audios if prompted with the right inference fu
|
|
46 |
Please, refer to the [Github Repository](https://github.com/benjaminogbonna/styletts2-finetuned) for complete code.
|
47 |
|
48 |
```python
|
|
|
49 |
!sudo apt-get update -y
|
50 |
!apt-get install build-essential -y
|
51 |
!pip install torch tensorboard transformers accelerate SoundFile torchaudio librosa phonemizer
|
@@ -54,6 +55,23 @@ Please, refer to the [Github Repository](https://github.com/benjaminogbonna/styl
|
|
54 |
!pip install hf_transfer -qU
|
55 |
!sudo apt-get install -y espeak-ng
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
#________________________
|
58 |
import nltk
|
59 |
nltk.download('punkt')
|
|
|
46 |
Please, refer to the [Github Repository](https://github.com/benjaminogbonna/styletts2-finetuned) for complete code.
|
47 |
|
48 |
```python
|
49 |
+
# install libraries
|
50 |
!sudo apt-get update -y
|
51 |
!apt-get install build-essential -y
|
52 |
!pip install torch tensorboard transformers accelerate SoundFile torchaudio librosa phonemizer
|
|
|
55 |
!pip install hf_transfer -qU
|
56 |
!sudo apt-get install -y espeak-ng
|
57 |
|
58 |
+
|
59 |
+
# ____________Download model_____________
|
60 |
+
model_repo = 'benjaminogbonna/tts_demo_models'
|
61 |
+
model_path = 'Models'
|
62 |
+
target_files = ['config.yml', 'model_v1.pth']
|
63 |
+
local_dir = '.'
|
64 |
+
|
65 |
+
import os
|
66 |
+
os.makedirs(local_dir, exist_ok=True)
|
67 |
+
downloaded_files = []
|
68 |
+
for file_name in target_files:
|
69 |
+
file_path = hf_hub_download(repo_id=model_repo, filename=f'{model_path}/{file_name}', local_dir=local_dir)
|
70 |
+
downloaded_files.append(file_path)
|
71 |
+
|
72 |
+
print('Downloaded files', downloaded_files)
|
73 |
+
|
74 |
+
|
75 |
#________________________
|
76 |
import nltk
|
77 |
nltk.download('punkt')
|