Skip to content

Commit

Permalink
enable running benchmark from anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
MahmoudAshraf97 committed Jun 29, 2024
1 parent fcf0e82 commit 9f78b36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benchmark/wer_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import json

import os
from datasets import load_dataset
from evaluate import load
from tqdm import tqdm
Expand All @@ -26,7 +26,9 @@

# define the evaluation metric
wer_metric = load("wer")
normalizer = EnglishTextNormalizer(json.load(open("normalizer.json")))

with open(os.path.join(os.path.dirname(__file__), "normalizer.json"), "r") as f:
normalizer = EnglishTextNormalizer(json.load(f))


def inference(batch):
Expand Down

0 comments on commit 9f78b36

Please sign in to comment.