Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
e44ec5e
1
Parent(s):
ee145fd
Update preprocessing/hubertinfer.py
Browse files
preprocessing/hubertinfer.py
CHANGED
@@ -11,11 +11,11 @@ from utils.hparams import hparams
|
|
11 |
|
12 |
|
13 |
class Hubertencoder():
|
14 |
-
def __init__(self, pt_path='checkpoints/hubert/hubert_soft.pt'):
|
15 |
if not 'use_vec' in hparams.keys():
|
16 |
hparams['use_vec'] = False
|
17 |
if hparams['use_vec']:
|
18 |
-
pt_path = "checkpoints/vec/checkpoint_best_legacy_500.pt"
|
19 |
self.dev = torch.device("cuda")
|
20 |
self.hbt_model = load_model(pt_path)
|
21 |
else:
|
|
|
11 |
|
12 |
|
13 |
class Hubertencoder():
|
14 |
+
def __init__(self, pt_path=f'.checkpoints/hubert/hubert_soft.pt'):
|
15 |
if not 'use_vec' in hparams.keys():
|
16 |
hparams['use_vec'] = False
|
17 |
if hparams['use_vec']:
|
18 |
+
pt_path = f".checkpoints/vec/checkpoint_best_legacy_500.pt"
|
19 |
self.dev = torch.device("cuda")
|
20 |
self.hbt_model = load_model(pt_path)
|
21 |
else:
|