Datasets:
anjalyjayakrishnan
commited on
Commit
·
f0c86d9
1
Parent(s):
28be160
error fix
Browse files
test.py
CHANGED
@@ -144,10 +144,14 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
144 |
|
145 |
def _generate_examples(self, filepath):
|
146 |
print("**********", filepath)
|
|
|
147 |
with open(filepath) as f:
|
148 |
data_df = pd.read_csv(f,sep=',')
|
149 |
print(data_df.columns)
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
|
144 |
|
145 |
def _generate_examples(self, filepath):
|
146 |
print("**********", filepath)
|
147 |
+
key = 0
|
148 |
with open(filepath) as f:
|
149 |
data_df = pd.read_csv(f,sep=',')
|
150 |
print(data_df.columns)
|
151 |
+
transcripts = []
|
152 |
+
for index,row in data_df.iterrows():
|
153 |
+
yield key, {
|
154 |
+
"sentence": data_df["sentence"],
|
155 |
+
"path": data_df["path"],
|
156 |
+
}
|
157 |
+
key+=1
|