lewtun HF staff commited on
Commit
bdc6920
1 Parent(s): e87760d
Files changed (4) hide show
  1. create_dataset.py +14 -0
  2. test.jsonl +3 -0
  3. train.jsonl +3 -0
  4. validation.jsonl +3 -0
create_dataset.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datasets import load_dataset
2
+
3
+
4
+ def main():
5
+ raw_dset = load_dataset("emotion")
6
+ labels = raw_dset["train"].features["label"]
7
+
8
+ for split, dset in raw_dset.items():
9
+ dset = dset.map(lambda x: {"label_text": labels.int2str(x["label"])}, num_proc=4)
10
+ dset.to_json(f"{split}.jsonl")
11
+
12
+
13
+ if __name__ == "__main__":
14
+ main()
test.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e067a2bbfd2f4902e3020b0af41db9a3a37544495cbfd3ea00aca2414c3a551
3
+ size 278760
train.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5adb38c9e047b4f2b0349175dfdaa06436bad53847dbcf89d107a0a8669b657
3
+ size 2234616
validation.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ca8ebb05f4e32c656e99f6c37c675261fc4b797421e7c36680bece86d63774e
3
+ size 276240