Remove model root in favor of relative urls
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -140,8 +140,9 @@
|
||||
import detectionMixin from './detection-mixin'
|
||||
import cameraMixin from './camera-mixin'
|
||||
|
||||
import detectionWorker from '../assets/detect-worker.js?worker&inline'
|
||||
import detectionWorker from '@/assets/detect-worker.js?worker&inline'
|
||||
// import thoraxModel from '/models/thorax/model.json?url'
|
||||
// console.log(thoraxModel)
|
||||
// import thoraxModelMini from '/models/thorax-mini/model.json?url'
|
||||
|
||||
export default {
|
||||
@@ -192,7 +193,6 @@
|
||||
created () {
|
||||
let loadOtherSettings = localStorage.getItem('otherSettings')
|
||||
if (loadOtherSettings) this.otherSettings = JSON.parse(loadOtherSettings)
|
||||
let modelRoot = new URL(import.meta.url).origin
|
||||
this.detectorName = this.f7route.params.region
|
||||
switch (this.detectorName) {
|
||||
case 'thorax':
|
||||
@@ -208,9 +208,9 @@
|
||||
this.activeRegion = 3
|
||||
break;
|
||||
}
|
||||
this.modelLocation = new URL(`/models/${this.detectorName}${this.otherSettings.mini ? '-mini' : ''}/model.json`,modelRoot).href
|
||||
this.miniLocation = new URL(`./models/${this.detectorName}-mini/model.json`,modelRoot).href
|
||||
fetch(`${modelRoot}/models/${this.detectorName}/classes.json`)
|
||||
this.modelLocation = `/models/${this.detectorName}${this.otherSettings.mini ? '-mini' : ''}/model.json`
|
||||
this.miniLocation = `/models/${this.detectorName}-mini/model.json`
|
||||
fetch(`/models/${this.detectorName}/classes.json`)
|
||||
.then((mod) => { return mod.json() })
|
||||
.then((classes) => {
|
||||
this.classesList = classes
|
||||
|
||||
Reference in New Issue
Block a user