Datasets:
ArXiv:
License:
Commit
·
5551826
1
Parent(s):
997d355
including large csvs in data splits
Browse files- 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 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
|
|
|
|
|
|
|
|
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 = ''
|