Skip to content

Commit 8113a8c

Browse files
authored
[AL-4860] Fix notebook imports and invalid notebook
2 parents 8220428 + 7e9f059 commit 8113a8c

File tree

4 files changed

+29
-32
lines changed

4 files changed

+29
-32
lines changed

examples/annotation_import/image.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@
8484
"metadata": {},
8585
"source": [
8686
"import labelbox as lb\n",
87-
"import labelbox.data.annotation_types as lb_types\n",
88-
"import labelbox.data.serialization as lb_serializers\n",
87+
"import labelbox.types as lb_types\n",
8988
"import uuid\n",
9089
"import numpy as np\n"
9190
],

examples/label_export/images.ipynb

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
2+
"nbformat": 4,
3+
"nbformat_minor": 2,
4+
"metadata": {},
25
"cells": [
36
{
4-
"cell_type": "markdown",
57
"metadata": {},
68
"source": [
79
"<td>\n",
810
" <a target=\"_blank\" href=\"https://labelbox.com\" ><img src=\"https://labelbox.com/blog/content/images/2021/02/logo-v4.svg\" width=256/></a>\n",
911
"</td>"
10-
]
12+
],
13+
"cell_type": "markdown"
1114
},
1215
{
13-
"cell_type": "markdown",
1416
"metadata": {},
1517
"source": [
1618
"<td>\n",
@@ -22,72 +24,70 @@
2224
"<a href=\"https://github.com/Labelbox/labelbox-python/tree/master/examples/label_export/images.ipynb\" target=\"_blank\"><img\n",
2325
"src=\"https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=white\" alt=\"GitHub\"></a>\n",
2426
"</td>"
25-
]
27+
],
28+
"cell_type": "markdown"
2629
},
2730
{
28-
"cell_type": "markdown",
2931
"metadata": {},
3032
"source": [
3133
"# Image Data Export\n",
3234
"* Export labels from image annotation projects"
33-
]
35+
],
36+
"cell_type": "markdown"
3437
},
3538
{
36-
"cell_type": "code",
37-
"execution_count": null,
3839
"metadata": {},
39-
"outputs": [],
4040
"source": [
4141
"!pip install \"labelbox[data]\""
42-
]
42+
],
43+
"cell_type": "code",
44+
"outputs": [],
45+
"execution_count": null
4346
},
4447
{
45-
"cell_type": "code",
46-
"execution_count": null,
4748
"metadata": {},
48-
"outputs": [],
4949
"source": [
5050
"import labelbox as lb\n",
5151
"import labelbox.types as lb_types\n",
5252
"\n",
5353
"from PIL import Image\n",
5454
"import numpy as np\n",
5555
"import os"
56-
]
56+
],
57+
"cell_type": "code",
58+
"outputs": [],
59+
"execution_count": null
5760
},
5861
{
59-
"cell_type": "markdown",
6062
"metadata": {},
6163
"source": [
6264
"# API Key and Client\n",
6365
"Provide a valid api key below in order to properly connect to the Labelbox Client."
64-
]
66+
],
67+
"cell_type": "markdown"
6568
},
6669
{
67-
"cell_type": "code",
68-
"execution_count": null,
6970
"metadata": {},
70-
"outputs": [],
7171
"source": [
7272
"# Add your api key and project\n",
7373
"API_KEY = None\n",
7474
"client = lb.Client(api_key=API_KEY)\n",
7575
"project = client.get_project(PROJECT_ID)"
76-
]
76+
],
77+
"cell_type": "code",
78+
"outputs": [],
79+
"execution_count": null
7780
},
7881
{
79-
"cell_type": "markdown",
8082
"metadata": {},
8183
"source": [
8284
"### Export the labels\n",
8385
"* Data can be exported to annotation objects or raw_json (old export format)"
84-
]
86+
],
87+
"cell_type": "markdown"
8588
},
8689
{
87-
"cell_type": "code",
88-
"execution_count": null,
8990
"metadata": {},
90-
"outputs": [],
9191
"source": [
9292
"labels = project.label_generator()\n",
9393
"\n",
@@ -169,4 +169,4 @@
169169
"execution_count": null
170170
}
171171
]
172-
}
172+
}

examples/prediction_upload/image_predictions.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
"metadata": {},
9292
"source": [
9393
"import labelbox as lb\n",
94-
"import labelbox.data.annotation_types as lb_types\n",
95-
"import labelbox.data.serialization as lb_serializers\n",
94+
"import labelbox.types as lb_types\n",
9695
"import uuid\n",
9796
"import numpy as np"
9897
],

examples/prediction_upload/text_predictions.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@
8484
"metadata": {},
8585
"source": [
8686
"import labelbox as lb\n",
87-
"import labelbox.data.annotation_types as lb_types\n",
88-
"import labelbox.data.serialization as lb_serializers\n",
87+
"import labelbox.types as lb_types\n",
8988
"import uuid"
9089
],
9190
"cell_type": "code",

0 commit comments

Comments
 (0)