Skip to content

Commit 458664a

Browse files
authored
Added media type to ontology
1 parent 4b39040 commit 458664a

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

examples/annotation_import/text.ipynb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
},
144144
"source": [
145145
"# Add your api key\n",
146-
"API_KEY=None\n",
146+
"API_KEY=API_KEY=None\n",
147147
"client = lb.Client(API_KEY)"
148148
],
149149
"cell_type": "code",
@@ -229,7 +229,7 @@
229229
"id": "CmakTYIMnFul"
230230
},
231231
"source": [
232-
"########## Classification - Radio (with subclassifcations) is only suppported with NDJSON tools ##########\n",
232+
"########## Classification - Radio and Checklist (with subclassifcations) is only suppported with NDJSON tools ##########\n",
233233
"\n",
234234
"# NDJSON\n",
235235
"nested_radio_annotation_ndjson= {\n",
@@ -340,11 +340,11 @@
340340
},
341341
{
342342
"metadata": {
343-
"id": "5GOSI_yunFul",
344-
"outputId": "0082435a-0533-469e-b790-8cc93d96f084",
345343
"colab": {
346344
"base_uri": "https://localhost:8080/"
347-
}
345+
},
346+
"id": "5GOSI_yunFul",
347+
"outputId": "0082435a-0533-469e-b790-8cc93d96f084"
348348
},
349349
"source": [
350350
"# You can now include ohter fields like attachments, media type and metadata in the data row creation step: https://docs.labelbox.com/reference/text-file \n",
@@ -401,11 +401,11 @@
401401
},
402402
{
403403
"metadata": {
404-
"id": "p8dR-eegnFum",
405-
"outputId": "f8933a3d-d1c6-4b61-a73d-760c44bc1d6b",
406404
"colab": {
407405
"base_uri": "https://localhost:8080/"
408-
}
406+
},
407+
"id": "p8dR-eegnFum",
408+
"outputId": "f8933a3d-d1c6-4b61-a73d-760c44bc1d6b"
409409
},
410410
"source": [
411411
"## Setup the ontology and link the tools created above.\n",
@@ -469,7 +469,7 @@
469469
" ]\n",
470470
")\n",
471471
"\n",
472-
"ontology = client.create_ontology(\"Ontology Text Annotations\", ontology_builder.asdict())\n"
472+
"ontology = client.create_ontology(\"Ontology Text Annotations\", ontology_builder.asdict(), media_type=lb.MediaType.Text)\n"
473473
],
474474
"cell_type": "code",
475475
"outputs": [
@@ -543,11 +543,11 @@
543543
},
544544
{
545545
"metadata": {
546-
"id": "Pxpuz4CPnFum",
547-
"outputId": "1ef538fb-f99a-4a9a-9e8e-eff9857d219b",
548546
"colab": {
549547
"base_uri": "https://localhost:8080/"
550-
}
548+
},
549+
"id": "Pxpuz4CPnFum",
550+
"outputId": "1ef538fb-f99a-4a9a-9e8e-eff9857d219b"
551551
},
552552
"source": [
553553
"# Setup Batches and Ontology\n",
@@ -690,11 +690,11 @@
690690
},
691691
{
692692
"metadata": {
693-
"id": "zKdWZm24nFun",
694-
"outputId": "7f4fa248-a5d6-471b-c9c3-bb95f1c14a68",
695693
"colab": {
696694
"base_uri": "https://localhost:8080/"
697-
}
695+
},
696+
"id": "zKdWZm24nFun",
697+
"outputId": "7f4fa248-a5d6-471b-c9c3-bb95f1c14a68"
698698
},
699699
"source": [
700700
"# Upload MAL label for this data row in project\n",
@@ -735,11 +735,11 @@
735735
},
736736
{
737737
"metadata": {
738-
"id": "-qZOAF2BnFun",
739-
"outputId": "1ff18daf-cb6e-4aa9-e880-fae13e45d84e",
740738
"colab": {
741739
"base_uri": "https://localhost:8080/"
742-
}
740+
},
741+
"id": "-qZOAF2BnFun",
742+
"outputId": "1ff18daf-cb6e-4aa9-e880-fae13e45d84e"
743743
},
744744
"source": [
745745
"# Upload label for this data row in project\n",

0 commit comments

Comments
 (0)