Update load_ds.py
Browse files- load_ds.py +3 -2
load_ds.py
CHANGED
@@ -19,10 +19,11 @@ data = defaultdict(list)
|
|
19 |
chunked_lines = chunk_examples(parsed_lines)
|
20 |
|
21 |
for line in chunked_lines:
|
22 |
-
|
|
|
23 |
|
24 |
dataset = Dataset.from_dict(data).shuffle(seed=42)
|
25 |
-
dataset = dataset.train_test_split(test_size=0.
|
26 |
print(dataset)
|
27 |
print(dataset.column_names)
|
28 |
|
|
|
19 |
chunked_lines = chunk_examples(parsed_lines)
|
20 |
|
21 |
for line in chunked_lines:
|
22 |
+
sc_line = line.replace(";", ",").replace("\n", " ; ")
|
23 |
+
data['text'].append(sc_line)
|
24 |
|
25 |
dataset = Dataset.from_dict(data).shuffle(seed=42)
|
26 |
+
dataset = dataset.train_test_split(test_size=0.05)
|
27 |
print(dataset)
|
28 |
print(dataset.column_names)
|
29 |
|