From 6781e757646aaefbff1facae2caf3f554e405b09 Mon Sep 17 00:00:00 2001 From: Radionic Date: Tue, 14 Nov 2023 13:35:33 +0800 Subject: [PATCH] fix: onnx url --- js/onnx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/onnx.js b/js/onnx.js index ec5df53..6dae0ae 100644 --- a/js/onnx.js +++ b/js/onnx.js @@ -11,7 +11,7 @@ export let model = null; export const initModel = async (modelType) => { try { model = await ort.InferenceSession.create( - `http://127.0.0.1:8188/sam_model?type=${modelType}` + `${location.protocol}//${location.host}/sam_model?type=${modelType}` ); } catch (e) { console.log(e);