inkoziev commited on
Commit
27ced4c
·
verified ·
1 Parent(s): 7db5e97

Upload conversations.py

Browse files
Files changed (1) hide show
  1. conversations.py +14 -0
conversations.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from datasets import Dataset, DatasetDict
2
+ import gzip
3
+ import json
4
+
5
+
6
+ def load_dataset():
7
+ data = []
8
+ with gzip.open("conversations.jsonl.gz", "rt", encoding="utf-8") as f:
9
+ for line in f:
10
+ data.append(json.loads(line))
11
+ return Dataset.from_list(data)
12
+
13
+
14
+ dataset = load_dataset()