Update custom_interface.py
Browse files- 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 |
-
|
27 |
-
|
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)
|