lucio commited on
Commit
b8e148c
1 Parent(s): 2915c9d

make this work

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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).to(device)
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