Norod78 commited on
Commit
00e5f76
1 Parent(s): 1e9b5e4

Update load_ds.py

Browse files
Files changed (1) hide show
  1. 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
- data['text'].append(line)
 
23
 
24
  dataset = Dataset.from_dict(data).shuffle(seed=42)
25
- dataset = dataset.train_test_split(test_size=0.1)
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