Spaces:
Runtime error
Runtime error
make this work
Browse files
app.py
CHANGED
@@ -20,10 +20,9 @@ lang_classifier = EncoderClassifier.from_hparams(
|
|
20 |
savedir="pretrained_models/lang-id-commonlanguage_ecapa"
|
21 |
)
|
22 |
|
23 |
-
@st.cache(hash_funcs={torch.nn.parameter.Parameter: lambda _: None})
|
24 |
def load_hf_model(model_path="facebook/wav2vec2-large-robust-ft-swbd-300h"):
|
25 |
processor = Wav2Vec2Processor.from_pretrained(model_path)
|
26 |
-
model = AutoModelForCTC.from_pretrained(model_path)
|
27 |
return processor, model
|
28 |
|
29 |
# download STT model
|
|
|
20 |
savedir="pretrained_models/lang-id-commonlanguage_ecapa"
|
21 |
)
|
22 |
|
|
|
23 |
def load_hf_model(model_path="facebook/wav2vec2-large-robust-ft-swbd-300h"):
|
24 |
processor = Wav2Vec2Processor.from_pretrained(model_path)
|
25 |
+
model = AutoModelForCTC.from_pretrained(model_path)
|
26 |
return processor, model
|
27 |
|
28 |
# download STT model
|