updated
Browse files- code/Untitled.ipynb +19 -1
code/Untitled.ipynb
CHANGED
@@ -15,7 +15,25 @@
|
|
15 |
}
|
16 |
],
|
17 |
"source": [
|
18 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
]
|
20 |
},
|
21 |
{
|
|
|
15 |
}
|
16 |
],
|
17 |
"source": [
|
18 |
+
"import argilla as rg\n",
|
19 |
+
"from datasets import load_dataset\n",
|
20 |
+
"\n",
|
21 |
+
"# You can find your Space URL behind the Embed this space button\n",
|
22 |
+
"# Change it\n",
|
23 |
+
"rg.init(\n",
|
24 |
+
" api_url=\"https://saroj502-uat.hf.space\", \n",
|
25 |
+
" api_key=\"12345678\"\n",
|
26 |
+
")\n",
|
27 |
+
"\n",
|
28 |
+
"banking_ds = load_dataset(\"argilla/banking_sentiment_setfit\", split=\"train\")\n",
|
29 |
+
"\n",
|
30 |
+
"# Argilla expects labels in the annotation column\n",
|
31 |
+
"banking_ds = banking_ds.rename_column(\"label\", \"annotation\")\n",
|
32 |
+
"\n",
|
33 |
+
"# Build argilla dataset from datasets\n",
|
34 |
+
"argilla_ds = rg.read_datasets(banking_ds, task=\"TextClassification\")\n",
|
35 |
+
"\n",
|
36 |
+
"rg.log(argilla_ds, \"banking_sentiment\")"
|
37 |
]
|
38 |
},
|
39 |
{
|