Spaces:
Running
Running
Commit
•
4ad4e5a
1
Parent(s):
963440b
Update demo.md
Browse files
demo.md
CHANGED
@@ -51,7 +51,7 @@ def evaluate_model(ds, pipe, wer_metric):
|
|
51 |
audio_sample = sample["audio"]
|
52 |
transcription = pipe(audio_sample["array"])['text']
|
53 |
# Keep only letter and spaces for evaluation
|
54 |
-
transcription = "".
|
55 |
wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
|
56 |
wer_scores.append(wer)
|
57 |
wer_results.append({
|
|
|
51 |
audio_sample = sample["audio"]
|
52 |
transcription = pipe(audio_sample["array"])['text']
|
53 |
# Keep only letter and spaces for evaluation
|
54 |
+
transcription = transcription.replace(",", "").replace(".", "").replace("!", "").replace("?", "")
|
55 |
wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
|
56 |
wer_scores.append(wer)
|
57 |
wer_results.append({
|