Skip to content

Commit 6d27c3c

Browse files
authored
[SN-131] corrected_HF.ipynb
1 parent 4b54082 commit 6d27c3c

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

examples/integrations/huggingface/huggingface.ipynb

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@
2424
"</td>"
2525
]
2626
},
27+
{
28+
"cell_type": "markdown",
29+
"metadata": {},
30+
"source": [
31+
"# Install required libraries"
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"#install the required packages\n",
41+
"\n",
42+
"!pip install -q \"labelbox[data]\"\n",
43+
"!pip install -q transformers"
44+
]
45+
},
2746
{
2847
"cell_type": "markdown",
2948
"metadata": {},
@@ -38,8 +57,6 @@
3857
"outputs": [],
3958
"source": [
4059
"# import libraries\n",
41-
"!pip install -q \"labelbox[data]\"\n",
42-
"!pip3 install -q transformers\n",
4360
"\n",
4461
"import labelbox as lb\n",
4562
"import transformers\n",
@@ -83,7 +100,7 @@
83100
"metadata": {},
84101
"outputs": [],
85102
"source": [
86-
"# get images from a Labelbox dataset\n",
103+
"# get images from a Labelbox dataset, those images needs to be available so you may need a token from your cloud provider\n",
87104
"DATASET_ID = \"\""
88105
]
89106
},
@@ -102,7 +119,6 @@
102119
"metadata": {},
103120
"outputs": [],
104121
"source": [
105-
"\n",
106122
"export_task = dataset.export_v2()\n",
107123
"\n",
108124
"export_task.wait_till_done()\n",
@@ -148,7 +164,7 @@
148164
"new_custom_embedding_id = client.create_embedding(name=\"My new awesome embedding\", dims=2048).id\n",
149165
"\n",
150166
"#or use an existing embedding from your workspace\n",
151-
"existing_embedding_id = client.get_embedding_by_name(name=\"ResNet img 2048\").id"
167+
"#existing_embedding_id = client.get_embedding_by_name(name=\"ResNet img 2048\").id"
152168
]
153169
},
154170
{

0 commit comments

Comments
 (0)