Spaces:
Runtime error
Runtime error
nguyenvulebinh
commited on
Commit
β’
352e7a3
1
Parent(s):
60684ee
Update app.py
Browse files
app.py
CHANGED
@@ -66,6 +66,7 @@ def inference(audio):
|
|
66 |
return_tensors="pt"
|
67 |
).input_values
|
68 |
# decode ctc output
|
|
|
69 |
pred_ids = torch.argmax(logits, dim=-1)
|
70 |
greedy_search_output = processor.decode(pred_ids)
|
71 |
beam_search_output = ngram_lm_model.decode(logits.cpu().detach().numpy(), beam_width=500)
|
|
|
66 |
return_tensors="pt"
|
67 |
).input_values
|
68 |
# decode ctc output
|
69 |
+
logits = model(input_values).logits[0]
|
70 |
pred_ids = torch.argmax(logits, dim=-1)
|
71 |
greedy_search_output = processor.decode(pred_ids)
|
72 |
beam_search_output = ngram_lm_model.decode(logits.cpu().detach().numpy(), beam_width=500)
|