jimregan commited on
Commit
bea827e
1 Parent(s): e41409d

check for None

Browse files
Files changed (1) hide show
  1. nst.py +1 -1
nst.py CHANGED
@@ -97,7 +97,7 @@ class NSTDataset(datasets.GeneratorBasedBuilder):
97
  # split is hardcoded to 'train' for now; there is a test set, but
98
  # it has not been modernised
99
  def _split_generators(self, dl_manager):
100
- if hasattr(dl_manager, 'manual_dir'):
101
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
102
  JSON_FILE = _JSON_URL.split("/")[-1]
103
  AUDIO_FILES = [
 
97
  # split is hardcoded to 'train' for now; there is a test set, but
98
  # it has not been modernised
99
  def _split_generators(self, dl_manager):
100
+ if hasattr(dl_manager, 'manual_dir') and dl_manager.manual_dir is not None:
101
  data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
102
  JSON_FILE = _JSON_URL.split("/")[-1]
103
  AUDIO_FILES = [