Skip to content

Commit 1e748d2

Browse files
authored
free-text python annotation confidence fixes (#1139)
1 parent ab5ee0c commit 1e748d2

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

examples/prediction_upload/html_predictions.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,14 @@
242242
"# Python annotation\n",
243243
"text_prediction = lb_types.ClassificationAnnotation(\n",
244244
" name = \"free_text\", \n",
245-
" value = lb_types.Text(answer=\"sample text\")\n",
245+
" value = lb_types.Text(answer=\"sample text\", confidence=0.5)\n",
246246
")\n",
247247
"\n",
248248
"# NDJSON\n",
249249
"text_prediction_ndjson = {\n",
250250
" \"name\": \"free_text\",\n",
251-
" \"answer\": \"sample text\"\n",
251+
" \"answer\": \"sample text\",\n",
252+
" \"confidence\": 0.5\n",
252253
"}"
253254
],
254255
"cell_type": "code",

examples/prediction_upload/image_predictions.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@
379379
"# Python annotation\n",
380380
"text_annotation = lb_types.ClassificationAnnotation(\n",
381381
" name=\"free_text\", \n",
382-
" confidence=0.5,\n",
383-
" value=lb_types.Text(answer=\"sample text\")\n",
382+
" value=lb_types.Text(answer=\"sample text\", confidence=0.5)\n",
384383
")\n",
385384
"\n",
386385
"# NDJSON\n",

examples/prediction_upload/text_predictions.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@
276276
"# Python annotation\n",
277277
"text_prediction = lb_types.ClassificationAnnotation(\n",
278278
" name = \"free_text\", \n",
279-
" confidence=0.5,\n",
280-
" value = lb_types.Text(answer=\"sample text\")\n",
279+
" value = lb_types.Text(answer=\"sample text\", confidence=0.5)\n",
281280
")\n",
282281
"\n",
283282
"# NDJSON\n",

0 commit comments

Comments
 (0)