Commit
·
3d18c9e
1
Parent(s):
5c60e25
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,9 @@ def parse(wav_file, applyLM):
|
|
49 |
|
50 |
def parse_transcription(wav_file):
|
51 |
input_values = read_file_and_process(wav_file)
|
52 |
-
|
|
|
|
|
53 |
predicted_ids = torch.argmax(logits, dim=-1)
|
54 |
|
55 |
transcription = processor.decode(predicted_ids[0], skip_special_tokens=True)
|
|
|
49 |
|
50 |
def parse_transcription(wav_file):
|
51 |
input_values = read_file_and_process(wav_file)
|
52 |
+
with torch.no_grad():
|
53 |
+
logits = model(**input_values).logits
|
54 |
+
#logits = model(input_values).logits
|
55 |
predicted_ids = torch.argmax(logits, dim=-1)
|
56 |
|
57 |
transcription = processor.decode(predicted_ids[0], skip_special_tokens=True)
|