Updated notebook
Browse files- explore.ipynb +11 -14
explore.ipynb
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
"outputs": [],
|
27 |
"source": [
|
28 |
"# install dependencies and get a token\n",
|
29 |
-
"!pip install datasets huggingface_hub ipywidgets\n",
|
30 |
"\n",
|
31 |
"from huggingface_hub import notebook_login\n",
|
32 |
"notebook_login()\n"
|
@@ -48,7 +48,7 @@
|
|
48 |
"from datasets import load_dataset\n",
|
49 |
"\n",
|
50 |
"# Download and check out metadata for dataset\n",
|
51 |
-
"dataset = load_dataset(
|
52 |
"dataset"
|
53 |
]
|
54 |
},
|
@@ -77,8 +77,10 @@
|
|
77 |
"metadata": {},
|
78 |
"outputs": [],
|
79 |
"source": [
|
80 |
-
"# download latest
|
81 |
-
"!
|
|
|
|
|
82 |
]
|
83 |
},
|
84 |
{
|
@@ -89,19 +91,14 @@
|
|
89 |
"source": [
|
90 |
"from datasets import Dataset\n",
|
91 |
"\n",
|
92 |
-
"# Load the data from the csv\n",
|
93 |
-
"
|
|
|
94 |
"\n",
|
95 |
"# Push the dataset to the Hugging Face Hub\n",
|
96 |
-
"
|
|
|
97 |
]
|
98 |
-
},
|
99 |
-
{
|
100 |
-
"cell_type": "code",
|
101 |
-
"execution_count": null,
|
102 |
-
"metadata": {},
|
103 |
-
"outputs": [],
|
104 |
-
"source": []
|
105 |
}
|
106 |
],
|
107 |
"metadata": {
|
|
|
26 |
"outputs": [],
|
27 |
"source": [
|
28 |
"# install dependencies and get a token\n",
|
29 |
+
"!pip install datasets huggingface_hub ipywidgets --quiet\n",
|
30 |
"\n",
|
31 |
"from huggingface_hub import notebook_login\n",
|
32 |
"notebook_login()\n"
|
|
|
48 |
"from datasets import load_dataset\n",
|
49 |
"\n",
|
50 |
"# Download and check out metadata for dataset\n",
|
51 |
+
"dataset = load_dataset(DATASET_NAME, split=\"eval\")\n",
|
52 |
"dataset"
|
53 |
]
|
54 |
},
|
|
|
77 |
"metadata": {},
|
78 |
"outputs": [],
|
79 |
"source": [
|
80 |
+
"# download latest CSVs from github\n",
|
81 |
+
"!rm -rf ./temp\n",
|
82 |
+
"!wget -P ./temp/eval https://raw.githubusercontent.com/docugami/DFM-benchmarks/main/data/annotations/eval/CSL-Small.csv\n",
|
83 |
+
"!wget -P ./temp/train https://raw.githubusercontent.com/docugami/DFM-benchmarks/main/data/annotations/train/CSL-Small.csv"
|
84 |
]
|
85 |
},
|
86 |
{
|
|
|
91 |
"source": [
|
92 |
"from datasets import Dataset\n",
|
93 |
"\n",
|
94 |
+
"# Load the data from the csv files\n",
|
95 |
+
"eval_set = Dataset.from_csv('./temp/eval/CSL-Small.csv')\n",
|
96 |
+
"train_set = Dataset.from_csv('./temp/train/CSL-Small.csv')\n",
|
97 |
"\n",
|
98 |
"# Push the dataset to the Hugging Face Hub\n",
|
99 |
+
"eval_set.push_to_hub(DATASET_NAME, split=\"eval\")\n",
|
100 |
+
"train_set.push_to_hub(DATASET_NAME, split=\"train\")"
|
101 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
],
|
104 |
"metadata": {
|