SefyanKehail
commited on
Commit
·
677e8db
1
Parent(s):
231bc11
debugging..
Browse files
app.py
CHANGED
|
@@ -5,20 +5,11 @@ import gradio as gr
|
|
| 5 |
import os
|
| 6 |
import sys
|
| 7 |
|
| 8 |
-
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 9 |
-
parent_dir = os.path.abspath(os.path.join(current_dir, os.pardir))
|
| 10 |
-
sys.path.append(parent_dir)
|
| 11 |
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
from hifigan import Generator as HIFIGANModel
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
hubert = HUmodel.HubertSoft()
|
| 20 |
-
acoustic = ACmodel.AcousticModel()
|
| 21 |
-
hifigan = HIFIGANModel()
|
| 22 |
|
| 23 |
hubert_loaded = torch.load("hubert_cpu.pt", map_location=torch.device('cpu'))
|
| 24 |
acoustic_loaded = torch.load("acoustic_cpu.pt", map_location=torch.device('cpu'))
|
|
|
|
| 5 |
import os
|
| 6 |
import sys
|
| 7 |
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
+
hubert = torch.hub.load("bshall/hubert:main", "hubert_soft", trust_repo=True, pretrained=False)
|
| 11 |
+
acoustic = torch.hub.load("bshall/acoustic-model:main", "hubert_soft", trust_repo=True, pretrained=False)
|
| 12 |
+
hifigan = torch.hub.load("bshall/hifigan:main", "hifigan_hubert_soft", trust_repo=True, pretrained=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
hubert_loaded = torch.load("hubert_cpu.pt", map_location=torch.device('cpu'))
|
| 15 |
acoustic_loaded = torch.load("acoustic_cpu.pt", map_location=torch.device('cpu'))
|