Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def inference(audio_file, audio_file2):
|
|
20 |
|
21 |
with torch.no_grad():
|
22 |
predicted_ids = torch.argmax(logits, dim=-1)
|
23 |
-
|
24 |
-
|
25 |
else:
|
26 |
transcription1 = "N/A"
|
27 |
|
|
|
20 |
|
21 |
with torch.no_grad():
|
22 |
predicted_ids = torch.argmax(logits, dim=-1)
|
23 |
+
predicted_ids[predicted_ids == -100] = processor.tokenizer.pad_token_id
|
24 |
+
transcription1 = processor.tokenizer.batch_decode(predicted_ids)[0]
|
25 |
else:
|
26 |
transcription1 = "N/A"
|
27 |
|