Datasets:

ArXiv:
License:
anjalyjayakrishnan commited on
Commit
5551826
·
1 Parent(s): 997d355

including large csvs in data splits

Browse files
Files changed (1) hide show
  1. snow-mountain.py +11 -7
snow-mountain.py CHANGED
@@ -198,13 +198,17 @@ class Test(datasets.GeneratorBasedBuilder):
198
  return temp_df
199
 
200
  with open(filepath) as f:
201
- print(">>>>>>>>>>>>>>>>>>", filepath)
202
- if filepath.endswith('all_verses.tar.gz'):
203
- data_df = parse_archive(filepath)
204
- elif filepath.endswith('short_verses.tar.gz'):
205
- data_df = parse_archive(filepath)
206
- else:
207
- data_df = pd.read_csv(f,sep=',')
 
 
 
 
208
  for index,row in data_df.iterrows():
209
  audio = row['path'].split('/')[-1]
210
  content = ''
 
198
  return temp_df
199
 
200
  with open(filepath) as f:
201
+ try:
202
+ data_df = pd.read_csv(f,sep=',')
203
+ except:
204
+ data_df = parse_archive(filepath)
205
+
206
+ # if filepath.endswith('all_verses.tar.gz'):
207
+ # data_df = parse_archive(filepath)
208
+ # elif filepath.endswith('short_verses.tar.gz'):
209
+ # data_df = parse_archive(filepath)
210
+ # else:
211
+ # data_df = pd.read_csv(f,sep=',')
212
  for index,row in data_df.iterrows():
213
  audio = row['path'].split('/')[-1]
214
  content = ''