Porjaz commited on
Commit
4e3512b
1 Parent(s): 79892f2

Update custom_interface.py

Browse files
Files changed (1) hide show
  1. custom_interface.py +2 -3
custom_interface.py CHANGED
@@ -23,9 +23,8 @@ class ASR(Pretrained):
23
  # predicted_words = [self.hparams.tokenizer.decode_ids(prediction).split(" ") for prediction in predictions]
24
  predicted_words = []
25
  for prediction in predictions:
26
- print(prediction)
27
- if prediction != 0:
28
- predicted_words.append(self.hparams.tokenizer.decode_ids(prediction).split(" "))
29
  prediction = []
30
  for sent in predicted_words:
31
  sent = self.filter_repetitions(sent, 3)
 
23
  # predicted_words = [self.hparams.tokenizer.decode_ids(prediction).split(" ") for prediction in predictions]
24
  predicted_words = []
25
  for prediction in predictions:
26
+ prediction = [token for token in prediction if token != 0]
27
+ predicted_words.append(self.hparams.tokenizer.decode_ids(prediction).split(" "))
 
28
  prediction = []
29
  for sent in predicted_words:
30
  sent = self.filter_repetitions(sent, 3)