Update model_hf.py
Browse files- model_hf.py +1 -1
model_hf.py
CHANGED
@@ -24,7 +24,7 @@ class SSLModel(nn.Module):
|
|
24 |
# eliminate fairseq dependency
|
25 |
# facebook/wav2vec2-xls-r-300m
|
26 |
# repo_id = "facebook/wav2vec2-xlsr-300m"
|
27 |
-
model =
|
28 |
# cp_path = hf_hub_download(repo_id=repo_id, filename=fname) # Change the pre-trained XLSR model path.
|
29 |
# model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
|
30 |
self.model = model
|
|
|
24 |
# eliminate fairseq dependency
|
25 |
# facebook/wav2vec2-xls-r-300m
|
26 |
# repo_id = "facebook/wav2vec2-xlsr-300m"
|
27 |
+
model = Wav2Vec2.from_pretrained("facebook/wav2vec2-xls-r-300m")
|
28 |
# cp_path = hf_hub_download(repo_id=repo_id, filename=fname) # Change the pre-trained XLSR model path.
|
29 |
# model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
|
30 |
self.model = model
|