Rajaram Sivaramakrishnan commited on
Commit
ca1429f
1 Parent(s): ef7575a

tiny changes to README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -39,7 +39,7 @@ import torchaudio
39
  from datasets import load_dataset
40
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
41
 
42
- test_dataset = load_dataset("common_voice", "tr", split="test[:2%]")
43
 
44
  processor = Wav2Vec2Processor.from_pretrained("Rajaram1996/wav2vec2-large-xlsr-tamil")
45
  model = Wav2Vec2ForCTC.from_pretrained("Rajaram1996/wav2vec2-large-xlsr-tamil")
@@ -76,7 +76,7 @@ from datasets import load_dataset, load_metric
76
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
77
  import re
78
 
79
- test_dataset = load_dataset("common_voice", "tr", split="test")
80
 
81
  wer = load_metric("wer")
82
 
@@ -109,7 +109,7 @@ def evaluate(batch):
109
  return batch
110
 
111
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
112
- print(wer.compute(predictions=result["predicted"], references=result["target"]))
113
  ```
114
 
115
  **Test Result**: 70.72 %
 
39
  from datasets import load_dataset
40
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
41
 
42
+ test_dataset = load_dataset("common_voice", "ta", split="test[:2%]")
43
 
44
  processor = Wav2Vec2Processor.from_pretrained("Rajaram1996/wav2vec2-large-xlsr-tamil")
45
  model = Wav2Vec2ForCTC.from_pretrained("Rajaram1996/wav2vec2-large-xlsr-tamil")
 
76
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
77
  import re
78
 
79
+ test_dataset = load_dataset("common_voice", "ta", split="test")
80
 
81
  wer = load_metric("wer")
82
 
 
109
  return batch
110
 
111
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
112
+ print("WER: {:2f}".format(100 * wer.compute(predictions=result["predicted"], references=result["target"])))
113
  ```
114
 
115
  **Test Result**: 70.72 %