English | 中文版
-
This repo contains several webai.js examples
Type Example Face Detection ppdet ImageNet Classification ppcls Human Segmentation ppseg
-
Clone this repo:
$ git clone https://github.com/AgentMaker/WebAI.js-Examples
-
Switch to the directory for the example, like './ppdet':
$ cd ./ppdet
-
Edit the model path in the code:
// main.js // It is recommended that models and configuration files be placed in the 'public' directory, where files can be referenced using the path '/*' ... const modelURL = [PATH TO MODEL] const modelConfig = [PATH TO CONFIG] ...
-
Install dependencies:
$ npm install
-
Develop the web page:
$ npm run dev # Through the browser to http://localhost:3000 to check and test page
-
Build the web page:
$ npm run build
-
Preview the built web page:
$ npm run preview # Through the browser to http://localhost:5000 to preview the built page
-
Build the web page to the '../docs' directory:
$ npm run build:docs
-
Deploy the web page to the Github/Gitee Page:
-
fork the repo
-
Complete web page development
-
Build the web page to the '../docs' directory
-
Enable the repo Page function
-
set 'docs' as the source of the Page function
-