Samip commited on
Commit
a57e035
·
1 Parent(s): fefa60c

Update scotch_try.py

Browse files
Files changed (1) hide show
  1. scotch_try.py +1 -1
scotch_try.py CHANGED
@@ -101,7 +101,7 @@ class ScotchDataset(datasets.GeneratorBasedBuilder):
101
  if isinstance(my_urls, str):
102
  my_urls = {self.config.name:my_urls}
103
  data_dir = [os.path.join(lang_dir,language_map[lang]) for lang,lang_dir in dl_manager.download_and_extract(my_urls).items()]
104
- filenames = next(walk(data_dir[0]), (None, None, []))[2] # [] if no file
105
  print('filenames are: ',filenames)
106
 
107
  print('items: ',dl_manager.download_and_extract(my_urls).items())
 
101
  if isinstance(my_urls, str):
102
  my_urls = {self.config.name:my_urls}
103
  data_dir = [os.path.join(lang_dir,language_map[lang]) for lang,lang_dir in dl_manager.download_and_extract(my_urls).items()]
104
+ filenames = next(walk(lang_dir), (None, None, []))[2] # [] if no file
105
  print('filenames are: ',filenames)
106
 
107
  print('items: ',dl_manager.download_and_extract(my_urls).items())