nguyenvulebinh commited on
Commit
673507e
β€’
1 Parent(s): f02c555

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -59,6 +59,7 @@ def inference(audio):
59
  return_tensors="pt"
60
  ).input_values
61
  # decode ctc output
 
62
  pred_ids = torch.argmax(logits, dim=-1)
63
  greedy_search_output = processor.decode(pred_ids)
64
  beam_search_output = ngram_lm_model.decode(logits.cpu().detach().numpy(), beam_width=500)
 
59
  return_tensors="pt"
60
  ).input_values
61
  # decode ctc output
62
+ logits = model(input_values).logits[0]
63
  pred_ids = torch.argmax(logits, dim=-1)
64
  greedy_search_output = processor.decode(pred_ids)
65
  beam_search_output = ngram_lm_model.decode(logits.cpu().detach().numpy(), beam_width=500)