jonatasgrosman commited on
Commit
0781a6f
1 Parent(s): f758bc3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -6
README.md CHANGED
@@ -132,14 +132,14 @@ test_dataset = test_dataset.map(speech_file_to_array_fn)
132
  # Preprocessing the datasets.
133
  # We need to read the audio files as arrays
134
  def evaluate(batch):
135
- \tinputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
136
 
137
- \twith torch.no_grad():
138
- \t\tlogits = model(inputs.input_values.to(DEVICE), attention_mask=inputs.attention_mask.to(DEVICE)).logits
139
 
140
- \tpred_ids = torch.argmax(logits, dim=-1)
141
- \tbatch["pred_strings"] = processor.batch_decode(pred_ids)
142
- \treturn batch
143
 
144
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
145
 
@@ -158,4 +158,5 @@ My model may report better scores than others because of some specificity of my
158
  | ------------- | ------------- | ------------- |
159
  | jonatasgrosman/wav2vec2-large-xlsr-53-hungarian | **31.40%** | **6.20%** |
160
  | anton-l/wav2vec2-large-xlsr-53-hungarian | 42.39% | 9.39% |
 
161
  | birgermoell/wav2vec2-large-xlsr-hungarian | 46.93% | 10.31% |
 
132
  # Preprocessing the datasets.
133
  # We need to read the audio files as arrays
134
  def evaluate(batch):
135
+ \\tinputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
136
 
137
+ \\twith torch.no_grad():
138
+ \\t\\tlogits = model(inputs.input_values.to(DEVICE), attention_mask=inputs.attention_mask.to(DEVICE)).logits
139
 
140
+ \\tpred_ids = torch.argmax(logits, dim=-1)
141
+ \\tbatch["pred_strings"] = processor.batch_decode(pred_ids)
142
+ \\treturn batch
143
 
144
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
145
 
 
158
  | ------------- | ------------- | ------------- |
159
  | jonatasgrosman/wav2vec2-large-xlsr-53-hungarian | **31.40%** | **6.20%** |
160
  | anton-l/wav2vec2-large-xlsr-53-hungarian | 42.39% | 9.39% |
161
+ | gchhablani/wav2vec2-large-xlsr-hu | 46.42% | 10.04% |
162
  | birgermoell/wav2vec2-large-xlsr-hungarian | 46.93% | 10.31% |