Saibo commited on
Commit
a5421c6
1 Parent(s): e650425

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -1
README.md CHANGED
@@ -17,8 +17,13 @@ dataset_info:
17
 
18
  6160 samples randomly sampled from the shard9 of Bookcorpus_compact_1024
19
  ```python
 
 
 
 
 
20
  shuffled_ds = ds.shuffle(seed=42)
21
- test_ds = Dataset.from_dict{shuffled_ds[:len(ds)//10]}
22
  ```
23
 
24
 
 
17
 
18
  6160 samples randomly sampled from the shard9 of Bookcorpus_compact_1024
19
  ```python
20
+ from datasets import load_dataset
21
+ from datasets import Dataset
22
+ corpus_name="xxx"
23
+
24
+ ds = load_dataset(corpus_name, split="train")
25
  shuffled_ds = ds.shuffle(seed=42)
26
+ test_ds = Dataset.from_dict{shuffled_ds[:6160]} # len(ds)//10
27
  ```
28
 
29