alexandreteles
commited on
Commit
•
2bc9b86
1
Parent(s):
833e7fe
INITIAL COMMIT
Browse files- process.ipynb +145 -0
- source/master_list.jsonl +0 -0
- source/processed_master_list.json +0 -0
- source/simplified_data.jsonl +0 -0
process.ipynb
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"id": "8c3e9cbf-2f30-4385-b47c-61b5e18077eb",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [],
|
9 |
+
"source": [
|
10 |
+
"import os\n",
|
11 |
+
"import datasets"
|
12 |
+
]
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"cell_type": "code",
|
16 |
+
"execution_count": 2,
|
17 |
+
"id": "5520b5b4-482b-4b35-9cd0-4b2ef9899030",
|
18 |
+
"metadata": {},
|
19 |
+
"outputs": [],
|
20 |
+
"source": [
|
21 |
+
"hf_username = \"alexandreteles\"\n",
|
22 |
+
"dataset_name = os.getcwd().split('/')[-1]\n",
|
23 |
+
"source_file = \"./source/simplified_data.jsonl\"\n",
|
24 |
+
"repository = f\"{hf_username}/{dataset_name}\""
|
25 |
+
]
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"cell_type": "code",
|
29 |
+
"execution_count": 4,
|
30 |
+
"id": "fa312d61-6bbe-4533-8337-127c94a6d5f2",
|
31 |
+
"metadata": {},
|
32 |
+
"outputs": [
|
33 |
+
{
|
34 |
+
"data": {
|
35 |
+
"application/vnd.jupyter.widget-view+json": {
|
36 |
+
"model_id": "28d3ccf3b3734943b90975a89657803c",
|
37 |
+
"version_major": 2,
|
38 |
+
"version_minor": 0
|
39 |
+
},
|
40 |
+
"text/plain": [
|
41 |
+
"Generating train split: 0 examples [00:00, ? examples/s]"
|
42 |
+
]
|
43 |
+
},
|
44 |
+
"metadata": {},
|
45 |
+
"output_type": "display_data"
|
46 |
+
}
|
47 |
+
],
|
48 |
+
"source": [
|
49 |
+
"dataset = datasets.load_dataset(\"json\", data_files=source_file)"
|
50 |
+
]
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"cell_type": "code",
|
54 |
+
"execution_count": 5,
|
55 |
+
"id": "be0d7ccd-d223-4c31-9238-da27d33288d1",
|
56 |
+
"metadata": {},
|
57 |
+
"outputs": [
|
58 |
+
{
|
59 |
+
"data": {
|
60 |
+
"application/vnd.jupyter.widget-view+json": {
|
61 |
+
"model_id": "d6a87b52f76940269b7a309892377653",
|
62 |
+
"version_major": 2,
|
63 |
+
"version_minor": 0
|
64 |
+
},
|
65 |
+
"text/plain": [
|
66 |
+
"Uploading the dataset shards: 0%| | 0/1 [00:00<?, ?it/s]"
|
67 |
+
]
|
68 |
+
},
|
69 |
+
"metadata": {},
|
70 |
+
"output_type": "display_data"
|
71 |
+
},
|
72 |
+
{
|
73 |
+
"data": {
|
74 |
+
"application/vnd.jupyter.widget-view+json": {
|
75 |
+
"model_id": "0425f1474c14423f8448eda75a3d24ce",
|
76 |
+
"version_major": 2,
|
77 |
+
"version_minor": 0
|
78 |
+
},
|
79 |
+
"text/plain": [
|
80 |
+
"Creating parquet from Arrow format: 0%| | 0/1 [00:00<?, ?ba/s]"
|
81 |
+
]
|
82 |
+
},
|
83 |
+
"metadata": {},
|
84 |
+
"output_type": "display_data"
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"data": {
|
88 |
+
"application/vnd.jupyter.widget-view+json": {
|
89 |
+
"model_id": "3dc81423fcf14b8fa8f204e5c7712f08",
|
90 |
+
"version_major": 2,
|
91 |
+
"version_minor": 0
|
92 |
+
},
|
93 |
+
"text/plain": [
|
94 |
+
"README.md: 0%| | 0.00/26.0 [00:00<?, ?B/s]"
|
95 |
+
]
|
96 |
+
},
|
97 |
+
"metadata": {},
|
98 |
+
"output_type": "display_data"
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"data": {
|
102 |
+
"text/plain": [
|
103 |
+
"CommitInfo(commit_url='https://huggingface.co/datasets/alexandreteles/fama_fraternitatis_multiturn/commit/051d3a26bb8188c2ce5c689d57043d4587331d43', commit_message='Upload dataset', commit_description='', oid='051d3a26bb8188c2ce5c689d57043d4587331d43', pr_url=None, pr_revision=None, pr_num=None)"
|
104 |
+
]
|
105 |
+
},
|
106 |
+
"execution_count": 5,
|
107 |
+
"metadata": {},
|
108 |
+
"output_type": "execute_result"
|
109 |
+
}
|
110 |
+
],
|
111 |
+
"source": [
|
112 |
+
"dataset.push_to_hub(repository)"
|
113 |
+
]
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"cell_type": "code",
|
117 |
+
"execution_count": null,
|
118 |
+
"id": "4c16bd9f-3068-43f2-8e3b-4a6b31874743",
|
119 |
+
"metadata": {},
|
120 |
+
"outputs": [],
|
121 |
+
"source": []
|
122 |
+
}
|
123 |
+
],
|
124 |
+
"metadata": {
|
125 |
+
"kernelspec": {
|
126 |
+
"display_name": "Python 3 (ipykernel)",
|
127 |
+
"language": "python",
|
128 |
+
"name": "python3"
|
129 |
+
},
|
130 |
+
"language_info": {
|
131 |
+
"codemirror_mode": {
|
132 |
+
"name": "ipython",
|
133 |
+
"version": 3
|
134 |
+
},
|
135 |
+
"file_extension": ".py",
|
136 |
+
"mimetype": "text/x-python",
|
137 |
+
"name": "python",
|
138 |
+
"nbconvert_exporter": "python",
|
139 |
+
"pygments_lexer": "ipython3",
|
140 |
+
"version": "3.12.3"
|
141 |
+
}
|
142 |
+
},
|
143 |
+
"nbformat": 4,
|
144 |
+
"nbformat_minor": 5
|
145 |
+
}
|
source/master_list.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
source/processed_master_list.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
source/simplified_data.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|