Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Node JS Samples #23581

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
!**/*.onnx
package-lock.json
package-lock.json
node_modules
2 changes: 1 addition & 1 deletion samples/nodejs/01_basic-usage/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const ort = require('onnxruntime');
const ort = require('onnxruntime-node');

// use an async context to call onnxruntime functions.
async function main() {
Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/01_basic-usage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"onnxruntime": "0.0.1-dev.20200429.2"
"onnxruntime-node": "^1.20.1"
}
}
2 changes: 1 addition & 1 deletion samples/nodejs/02_create-tensor/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const Tensor = require('onnxruntime').Tensor;
const Tensor = require('onnxruntime-node').Tensor;

//
// create a [2x3x4] float tensor
Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/02_create-tensor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"onnxruntime": "0.0.1-dev.20200429.2"
"onnxruntime-node": "^1.20.1"
}
}
2 changes: 1 addition & 1 deletion samples/nodejs/04_create-inference-session/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const fs = require('fs');
const util = require('util');
const InferenceSession = require('onnxruntime').InferenceSession;
const InferenceSession = require('onnxruntime-node').InferenceSession;

// use an async context to call onnxruntime functions.
async function main() {
Expand Down
2 changes: 1 addition & 1 deletion samples/nodejs/04_create-inference-session/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"onnxruntime": "0.0.1-dev.20200429.2"
"onnxruntime-node": "^1.20.1"
}
}
Loading