varora commited on
Commit
2c7120d
1 Parent(s): 3f43901

update hit.py

Browse files
Files changed (1) hide show
  1. hit.py +2 -2
hit.py CHANGED
@@ -118,13 +118,13 @@ class NewDataset(datasets.GeneratorBasedBuilder):
118
  gender = self.config.name
119
  #data_urls = _BASE_URL + rel_path
120
 
121
- url = "hit_dataset.json"
122
  file_structure = dl_manager.download_and_extract(url)
123
  with open(file_structure) as f:
124
  file_structure = json.load(f)
125
  print(file_structure)
126
 
127
- data_urls = {split: [os.path.join(gender, split, "*.gz")] for split in splits}
128
 
129
  print(f"data url: {data_urls}")
130
  archive_paths = dl_manager.download(data_urls)
 
118
  gender = self.config.name
119
  #data_urls = _BASE_URL + rel_path
120
 
121
+ file_structure_url = "hit_dataset.json"
122
  file_structure = dl_manager.download_and_extract(url)
123
  with open(file_structure) as f:
124
  file_structure = json.load(f)
125
  print(file_structure)
126
 
127
+ data_urls = {split: [os.path.join(gender, split, filename) for filename in file_structure[gender][split]] for split in splits}
128
 
129
  print(f"data url: {data_urls}")
130
  archive_paths = dl_manager.download(data_urls)