saroj502 commited on
Commit
267f626
1 Parent(s): 4bef9ac

upload file

Browse files
Files changed (1) hide show
  1. Untitled.ipynb +69 -0
Untitled.ipynb ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 14,
6
+ "id": "b09afbb1-cb88-4ba3-95c8-eba0b484456e",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "name": "stdout",
11
+ "output_type": "stream",
12
+ "text": [
13
+ "Hello Argilla\n"
14
+ ]
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
+ {
40
+ "cell_type": "code",
41
+ "execution_count": null,
42
+ "id": "9226f05b-1a03-45b8-af4d-2fc031514bc3",
43
+ "metadata": {},
44
+ "outputs": [],
45
+ "source": []
46
+ }
47
+ ],
48
+ "metadata": {
49
+ "kernelspec": {
50
+ "display_name": "Python 3 (ipykernel)",
51
+ "language": "python",
52
+ "name": "python3"
53
+ },
54
+ "language_info": {
55
+ "codemirror_mode": {
56
+ "name": "ipython",
57
+ "version": 3
58
+ },
59
+ "file_extension": ".py",
60
+ "mimetype": "text/x-python",
61
+ "name": "python",
62
+ "nbconvert_exporter": "python",
63
+ "pygments_lexer": "ipython3",
64
+ "version": "3.8.17"
65
+ }
66
+ },
67
+ "nbformat": 4,
68
+ "nbformat_minor": 5
69
+ }