diff --git a/src/lib/assets/js/ort_utils.js b/src/lib/assets/js/ort_utils.js index a3ed71f..059c433 100644 --- a/src/lib/assets/js/ort_utils.js +++ b/src/lib/assets/js/ort_utils.js @@ -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; @@ -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));