Harveenchadha
commited on
Commit
•
134d885
1
Parent(s):
2ce792c
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,11 @@ def parse_transcription_with_lm(wav_file):
|
|
29 |
with torch.no_grad():
|
30 |
logits = model(**input_values).logits[0].cpu().numpy()
|
31 |
print(logits)
|
32 |
-
int_result = processor_with_LM.decode(logits = logits, output_word_offsets=False
|
|
|
|
|
|
|
|
|
33 |
print(int_result)
|
34 |
transcription = int_result.text.replace('<s>','')
|
35 |
return transcription
|
|
|
29 |
with torch.no_grad():
|
30 |
logits = model(**input_values).logits[0].cpu().numpy()
|
31 |
print(logits)
|
32 |
+
int_result = processor_with_LM.decode(logits = logits, output_word_offsets=False,
|
33 |
+
beam_width=128,
|
34 |
+
alpha=2,
|
35 |
+
beta=-1
|
36 |
+
)
|
37 |
print(int_result)
|
38 |
transcription = int_result.text.replace('<s>','')
|
39 |
return transcription
|