Skip to content

Commit

Permalink
Use offset in class mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
vishniakov-nikolai committed Sep 18, 2023
1 parent 11a61ee commit 7df5c30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/js/node/notebooks/001-hello-world.nnb
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@
{
"language": "javascript",
"source": [
"const imagenetClassesMap = require('../../assets/datasets/imagenet_class_index.json');\n\nconsole.log(`Result: ${imagenetClassesMap[resultIndex][1]}`);"
"const imagenetClassesMap = require('../../assets/datasets/imagenet_class_index.json');\nconst imagenetClasses = ['background', ...Object.values(imagenetClassesMap)];\n\nconsole.log(`Result: ${imagenetClasses[resultIndex][1]}`);"
],
"outputs": [
{
"items": [
{
"mime": "application/vnd.code.notebook.stdout",
"value": [
"Result: curly-coated_retriever",
"Result: flat-coated_retriever",
""
]
}
Expand Down

0 comments on commit 7df5c30

Please sign in to comment.