Skip to content

Commit

Permalink
model path
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelem committed Oct 11, 2023
1 parent 069ccd4 commit d81ed56
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/assets/js/ort_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ const l = (i) => {
const getUrlById = (id) => {
for (let i = 0; i < models.length; i++) {
if (models[i].id === id) {
return models[i].url;
if (location.hostname.indexOf('github.io') > -1) {
return models[i].url.github;
} else {
return `https://${localhost}/` + models[i].url.local;
}
}
}
return null;
Expand Down Expand Up @@ -274,6 +278,7 @@ const main = async (_id, _model, _modelType, _dataType, _backend) => {
updateInfo(`${testQueueLength - testQueue.length + 1}/${testQueueLength} Testing ${_model} (${_modelType}/${_dataType}) with ${backend} backend`);
updateInfo(`${testQueueLength - testQueue.length + 1}/${testQueueLength} Creating onnx runtime web inference session ...`);

updateInfo(`${testQueueLength - testQueue.length + 1}/${testQueueLength} Downloading model from ${modelPath}...`);
const sess = await ort.InferenceSession.create(modelPath, options);
updateInfo(`${testQueueLength - testQueue.length + 1}/${testQueueLength} Warming up ...`);
let feeds = clone(getFeeds(_model, _dataType));
Expand Down

0 comments on commit d81ed56

Please sign in to comment.