Compare commits

..
Author SHA1 Message Date
Dan Petro 921a8f061d Make asset paths relative 2021-06-07 10:09:39 -07:00
Dan Petro e94635ac00 Remove unused variable 2021-06-07 09:43:37 -07:00
2 changed files with 4 additions and 5 deletions

No files matched your search

@@ -21,7 +21,6 @@ export class EyeballerComponent implements OnInit {
model: any = null;
imageCount = 0;
finishedLoading = false;
eyeballing = false;
eyeballCompleted = false;
eyeballedCount = 0;
@@ -144,12 +143,12 @@ export class EyeballerComponent implements OnInit {
}
async fetchTfFiles() {
let resp = await fetch('/assets/tf/model.json');
let resp = await fetch('assets/tf/model.json');
const manifest = await resp.json();
const paths: string[] = Array.from(manifest.weightsManifest[0]?.paths);
this.tfFiles = [];
resp = await fetch('/assets/tf/model.json');
resp = await fetch('assets/tf/model.json');
const blob = await resp.blob();
this.tfFiles.push(new File([blob], 'model.json'));
await Promise.all(paths.map(async (path) => {
@@ -161,7 +160,7 @@ export class EyeballerComponent implements OnInit {
async fetchTfFile(name: string): Promise<File> {
const base = name.split('/').reverse()[0];
const resp = await fetch(`/assets/tf/${base}`);
const resp = await fetch(`assets/tf/${base}`);
const blob = await resp.blob();
return new File([blob], base);
}
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Eyeballer</title>
<base href="/">
<base href=".">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>