Skip to content

Commit 97bbd28

Browse files
authored
Removed broken link , rename annotations
1 parent 22137be commit 97bbd28

File tree

1 file changed

+64
-49
lines changed

1 file changed

+64
-49
lines changed

examples/prediction_upload/html_predictions.ipynb

Lines changed: 64 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,25 @@
8787
"!pip install -q 'labelbox[data]'"
8888
],
8989
"metadata": {
90-
"id": "cm8xMaLbGb7v"
90+
"id": "cm8xMaLbGb7v",
91+
"colab": {
92+
"base_uri": "https://localhost:8080/"
93+
},
94+
"outputId": "65ba50e8-4a5d-45c5-90b7-7f8c2c168c62"
9195
},
92-
"execution_count": 49,
93-
"outputs": []
96+
"execution_count": 1,
97+
"outputs": [
98+
{
99+
"output_type": "stream",
100+
"name": "stdout",
101+
"text": [
102+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m185.5/185.5 KB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
103+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m17.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
104+
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
105+
" Building wheel for pygeotile (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
106+
]
107+
}
108+
]
94109
},
95110
{
96111
"cell_type": "code",
@@ -112,7 +127,7 @@
112127
"metadata": {
113128
"id": "NIq-6M9kHKSs"
114129
},
115-
"execution_count": 50,
130+
"execution_count": 2,
116131
"outputs": []
117132
},
118133
{
@@ -128,13 +143,13 @@
128143
{
129144
"cell_type": "code",
130145
"source": [
131-
"API_KEY = None\n",
146+
"API_KEY = None\n",
132147
"client = Client(API_KEY)"
133148
],
134149
"metadata": {
135150
"id": "z7ZLKLYLHP__"
136151
},
137-
"execution_count": 51,
152+
"execution_count": 3,
138153
"outputs": []
139154
},
140155
{
@@ -165,7 +180,7 @@
165180
"metadata": {
166181
"id": "FJhCAqeR-cUJ"
167182
},
168-
"execution_count": 52,
183+
"execution_count": 4,
169184
"outputs": []
170185
},
171186
{
@@ -216,7 +231,7 @@
216231
"metadata": {
217232
"id": "D_luKHzuY-b3"
218233
},
219-
"execution_count": 53,
234+
"execution_count": 5,
220235
"outputs": []
221236
},
222237
{
@@ -257,7 +272,7 @@
257272
"metadata": {
258273
"id": "rjHUJUbGZXgY"
259274
},
260-
"execution_count": 54,
275+
"execution_count": 6,
261276
"outputs": []
262277
},
263278
{
@@ -280,7 +295,7 @@
280295
"metadata": {
281296
"id": "dMpF0LfZZZpg"
282297
},
283-
"execution_count": 55,
298+
"execution_count": 7,
284299
"outputs": []
285300
},
286301
{
@@ -309,24 +324,24 @@
309324
"colab": {
310325
"base_uri": "https://localhost:8080/"
311326
},
312-
"outputId": "537e3d11-3809-46fd-af14-4821ae7b89b0"
327+
"outputId": "e7c7dd14-293e-42e7-d93e-faebdbbab036"
313328
},
314-
"execution_count": 56,
329+
"execution_count": 8,
315330
"outputs": [
316331
{
317332
"output_type": "stream",
318333
"name": "stdout",
319334
"text": [
320335
"<DataRow {\n",
321-
" \"created_at\": \"2023-01-24 20:57:13+00:00\",\n",
336+
" \"created_at\": \"2023-01-24 22:36:16+00:00\",\n",
322337
" \"external_id\": null,\n",
323-
" \"global_key\": \"eb359c83-89e5-42e3-8fc5-dd2a5f22fb1e\",\n",
338+
" \"global_key\": \"c23d513c-57f1-48ad-a233-53ff99a795c4\",\n",
324339
" \"media_attributes\": {},\n",
325340
" \"metadata\": [],\n",
326341
" \"metadata_fields\": [],\n",
327342
" \"row_data\": \"https://storage.googleapis.com/labelbox-datasets/html_sample_data/sample_html_2.html\",\n",
328-
" \"uid\": \"cldapxjfn0gns07xkfn9p4ct8\",\n",
329-
" \"updated_at\": \"2023-01-24 20:57:13+00:00\"\n",
343+
" \"uid\": \"cldatgxbz33qk07y0cknjgnsf\",\n",
344+
" \"updated_at\": \"2023-01-24 22:36:16+00:00\"\n",
330345
"}>\n"
331346
]
332347
}
@@ -407,7 +422,7 @@
407422
"metadata": {
408423
"id": "Kt4XWWqgIiWk"
409424
},
410-
"execution_count": 57,
425+
"execution_count": 9,
411426
"outputs": []
412427
},
413428
{
@@ -431,7 +446,7 @@
431446
"metadata": {
432447
"id": "8n-AvzdiOR6d"
433448
},
434-
"execution_count": 59,
449+
"execution_count": 10,
435450
"outputs": []
436451
},
437452
{
@@ -453,9 +468,9 @@
453468
"colab": {
454469
"base_uri": "https://localhost:8080/"
455470
},
456-
"outputId": "ebb721f4-b795-4511-bdd6-aac4f92a4e71"
471+
"outputId": "630f3187-5377-4607-af50-5c8250fd431a"
457472
},
458-
"execution_count": 60,
473+
"execution_count": 11,
459474
"outputs": [
460475
{
461476
"output_type": "execute_result",
@@ -465,7 +480,7 @@
465480
]
466481
},
467482
"metadata": {},
468-
"execution_count": 60
483+
"execution_count": 11
469484
}
470485
]
471486
},
@@ -474,7 +489,7 @@
474489
"source": [
475490
"## Step 5. Create the predictions payload\n",
476491
"\n",
477-
"Create the annotations payload using the snippets of [code here](https://https://docs.labelbox.com/reference/import-image-annotations#supported-annotations).\n",
492+
"Create the annotations payload using the snippets of code in the **Supported Predictions** section.\n",
478493
"\n",
479494
"Labelbox support two formats for the annotations payload: NDJSON and Python Annotation types. Both are described below to compose your annotations into Labels attached to the data rows.\n",
480495
"\n",
@@ -507,7 +522,7 @@
507522
"metadata": {
508523
"id": "zv2OLTXKSGWv"
509524
},
510-
"execution_count": 61,
525+
"execution_count": 12,
511526
"outputs": []
512527
},
513528
{
@@ -540,7 +555,7 @@
540555
"metadata": {
541556
"id": "F-Y7sSyAV3tn"
542557
},
543-
"execution_count": 62,
558+
"execution_count": 13,
544559
"outputs": []
545560
},
546561
{
@@ -568,9 +583,9 @@
568583
"colab": {
569584
"base_uri": "https://localhost:8080/"
570585
},
571-
"outputId": "81984276-a391-4e34-f9cd-3974792ec2bb"
586+
"outputId": "6b6841ae-cca5-4813-d1ac-1e964ae6c104"
572587
},
573-
"execution_count": 63,
588+
"execution_count": 14,
574589
"outputs": [
575590
{
576591
"output_type": "stream",
@@ -615,7 +630,7 @@
615630
"metadata": {
616631
"id": "jEtoDiDrPFvI"
617632
},
618-
"execution_count": 64,
633+
"execution_count": 15,
619634
"outputs": []
620635
},
621636
{
@@ -641,19 +656,19 @@
641656
"colab": {
642657
"base_uri": "https://localhost:8080/"
643658
},
644-
"outputId": "dad5bd19-32ce-45e1-cfd5-b925e37037f2"
659+
"outputId": "ff468996-5876-4001-99e8-73b597bf5083"
645660
},
646-
"execution_count": 65,
661+
"execution_count": 16,
647662
"outputs": [
648663
{
649664
"output_type": "execute_result",
650665
"data": {
651666
"text/plain": [
652-
"<Batch ID: d22f70b0-9c29-11ed-9ce8-292230ae59f9>"
667+
"<Batch ID: 8e97f0d0-9c37-11ed-8a1b-5b30e16bddf7>"
653668
]
654669
},
655670
"metadata": {},
656-
"execution_count": 65
671+
"execution_count": 16
657672
}
658673
]
659674
},
@@ -672,13 +687,13 @@
672687
"###### Annotations ###### \n",
673688
"\n",
674689
"\n",
675-
"radio_prediction_ndjson = {\n",
690+
"radio_annotation_ndjson = {\n",
676691
" 'name': 'radio_question',\n",
677692
" 'answer': {'name': 'first_radio_answer'}\n",
678693
"}\n",
679694
"\n",
680695
"\n",
681-
"nested_radio_prediction_ndjson = {\n",
696+
"nested_radio_annotation_ndjson = {\n",
682697
" 'name': 'radio_question_sub',\n",
683698
" 'answer': {\n",
684699
" 'name': 'first_radio_answer',\n",
@@ -690,7 +705,7 @@
690705
"}\n",
691706
"\n",
692707
"\n",
693-
"nested_checklist_prediction_ndjson = {\n",
708+
"nested_checklist_annotation_ndjson = {\n",
694709
" \"name\": \"nested_checklist_question\",\n",
695710
" \"answer\": [{\n",
696711
" \"name\": \"first_checklist_answer\", \n",
@@ -703,23 +718,23 @@
703718
" }]\n",
704719
"}\n",
705720
"\n",
706-
"checklist_prediction_ndjson = {\n",
721+
"checklist_annotation_ndjson = {\n",
707722
" 'name': 'checklist_question',\n",
708723
" 'answer': [\n",
709724
" {'name': 'first_checklist_answer', }\n",
710725
" ]\n",
711726
"}\n",
712727
"\n",
713728
"\n",
714-
"text_prediction_ndjson = {\n",
729+
"text_annotation_ndjson = {\n",
715730
" 'name': 'free_text',\n",
716731
" 'answer': 'sample text'\n",
717732
"}\n"
718733
],
719734
"metadata": {
720735
"id": "A8_HVvu9Uvfl"
721736
},
722-
"execution_count": 66,
737+
"execution_count": 17,
723738
"outputs": []
724739
},
725740
{
@@ -736,11 +751,11 @@
736751
"source": [
737752
"ndjson_annotation = []\n",
738753
"for annot in [\n",
739-
" radio_prediction_ndjson,\n",
740-
" nested_radio_prediction_ndjson,\n",
741-
" nested_checklist_prediction_ndjson ,\n",
742-
" checklist_prediction_ndjson,\n",
743-
" text_prediction_ndjson\n",
754+
" radio_annotation_ndjson,\n",
755+
" nested_radio_annotation_ndjson,\n",
756+
" nested_checklist_annotation_ndjson ,\n",
757+
" checklist_annotation_ndjson,\n",
758+
" text_annotation_ndjson\n",
744759
" ]:\n",
745760
" annot.update({\n",
746761
" 'uuid': str(uuid.uuid4()),\n",
@@ -751,7 +766,7 @@
751766
"metadata": {
752767
"id": "9gD_alThQA3G"
753768
},
754-
"execution_count": 67,
769+
"execution_count": 18,
755770
"outputs": []
756771
},
757772
{
@@ -781,9 +796,9 @@
781796
"colab": {
782797
"base_uri": "https://localhost:8080/"
783798
},
784-
"outputId": "495b5db6-14b4-4901-8000-7d831d85968c"
799+
"outputId": "ef8c5932-35df-4feb-9879-81fd89c5897b"
785800
},
786-
"execution_count": 68,
801+
"execution_count": 19,
787802
"outputs": [
788803
{
789804
"output_type": "stream",
@@ -815,9 +830,9 @@
815830
"colab": {
816831
"base_uri": "https://localhost:8080/"
817832
},
818-
"outputId": "f3272425-c1de-4dff-d2fe-d8c238d084bb"
833+
"outputId": "9234850e-fc29-427e-e75e-d16237b3ef08"
819834
},
820-
"execution_count": 69,
835+
"execution_count": 20,
821836
"outputs": [
822837
{
823838
"output_type": "execute_result",
@@ -827,7 +842,7 @@
827842
]
828843
},
829844
"metadata": {},
830-
"execution_count": 69
845+
"execution_count": 20
831846
}
832847
]
833848
},
@@ -849,7 +864,7 @@
849864
"metadata": {
850865
"id": "aAhkyvJlWK1p"
851866
},
852-
"execution_count": null,
867+
"execution_count": 21,
853868
"outputs": []
854869
}
855870
]

0 commit comments

Comments
 (0)