SeyedAli commited on
Commit
277ff1a
β€’
1 Parent(s): 88da6c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -71,7 +71,7 @@ def ASR(audio):
71
  logits = model(input_values,attention_mask).logits
72
  # Decode the transcription
73
  #result = normalizer(processor.batch_decode(torch.argmax(logits[0], dim=-1)),chars_to_ignore,chars_to_mapping)
74
- result = processor.batch_decode(torch.argmax(logits[0], dim=-1)),chars_to_ignore,chars_to_mapping
75
  # max_items = np.random.randint(0, len(result), 10).tolist()
76
  # for i in max_items:
77
  # transcription=result[i]
 
71
  logits = model(input_values,attention_mask).logits
72
  # Decode the transcription
73
  #result = normalizer(processor.batch_decode(torch.argmax(logits[0], dim=-1)),chars_to_ignore,chars_to_mapping)
74
+ result = processor.decode(torch.argmax(logits[0], dim=-1))
75
  # max_items = np.random.randint(0, len(result), 10).tolist()
76
  # for i in max_items:
77
  # transcription=result[i]