SajjadAyoubi commited on
Commit
1d629c2
1 Parent(s): cf6d861

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,8 +19,8 @@ class Speech2Text:
19
 
20
  def feature2logits(self, features):
21
  with torch.no_grad():
22
- return model(features.input_values.to(device),
23
- attention_mask=features.attention_mask.to(device)).logits.numpy()[0]
24
 
25
  def __call__(self, path):
26
  logits = self.feature2logits(self.wav2feature(path))
 
19
 
20
  def feature2logits(self, features):
21
  with torch.no_grad():
22
+ return wav2vec_model(features.input_values.to(device),
23
+ attention_mask=features.attention_mask.to(device)).logits.numpy()[0]
24
 
25
  def __call__(self, path):
26
  logits = self.feature2logits(self.wav2feature(path))