Emilio Marinone commited on
Commit
416ec7b
1 Parent(s): 373ffd6

remove encoding in loading json

Browse files
Files changed (1) hide show
  1. nst_no.py +3 -2
nst_no.py CHANGED
@@ -193,7 +193,8 @@ class NstSV(datasets.GeneratorBasedBuilder):
193
  urls = _URLS[self.config.name]
194
  data_dirs = dl_manager.download_and_extract(urls)
195
  annotations_dirs = dl_manager.download_and_extract(_ANNOTATIONS_URL)
196
-
 
197
  return [
198
  datasets.SplitGenerator(
199
  name=datasets.Split.TRAIN,
@@ -243,7 +244,7 @@ class NstSV(datasets.GeneratorBasedBuilder):
243
  for annotation_filename in tqdm(annotations_files):
244
 
245
  annotations_filepath = os.path.join(annotations_dir, annotation_filename)
246
- with open(annotations_filepath, "r", encoding="utf-8") as f:
247
  annotation = json.load(f)
248
 
249
  if "val_recordings" in annotation:
 
193
  urls = _URLS[self.config.name]
194
  data_dirs = dl_manager.download_and_extract(urls)
195
  annotations_dirs = dl_manager.download_and_extract(_ANNOTATIONS_URL)
196
+ print(f"data dirs: {data_dirs}")
197
+ print(f"annotation dirs: {annotations_dirs}")
198
  return [
199
  datasets.SplitGenerator(
200
  name=datasets.Split.TRAIN,
 
244
  for annotation_filename in tqdm(annotations_files):
245
 
246
  annotations_filepath = os.path.join(annotations_dir, annotation_filename)
247
+ with open(annotations_filepath, "r") as f:
248
  annotation = json.load(f)
249
 
250
  if "val_recordings" in annotation: