In-Browser Object Detection with SSD Mobilenet
https://harryli0088.github.io/tfjs-test/
Adapted from https://github.com/Sh031224/svelte-kit-github-page-example
- Install
adapter-static
andgh-pages
npm i -D @sveltejs/adapter-static@next gh-pages
- Updated
svelte.config.js
import static_adapter from '@sveltejs/adapter-static';
const config = {
kit: {
adapter: static_adapter({
// default options are shown
pages: 'build',
assets: 'build',
fallback: null
}),
paths: {
base: process.env.NODE_ENV==="production" ? '/your-repo-name' : undefined,
}
}
};
export default config;
-
Add an empty
.nojekyll
file in yourstatic/
directory, otherwise GitHub Pages will ignore files with a leading underscore (ie_app/
) -
Add a period in front of your favicon import in
src/app.html
<link rel="icon" href="./favicon.png" />
- Add a deploy script to
package.json
{
"scripts": {
"deploy": "npm run build && npx gh-pages -d build -t true"
}
}
- Run the deploy script
npm run deploy
MIT License