Skip to content

Running ONNXRuntime Web using Webpack to use WebAssembly

Notifications You must be signed in to change notification settings

sahirgomez1/react-onnxruntime

Repository files navigation

ONNX Runtime Web - Webpack - React

This repo is a quick demonstration to run ONNX Runtime Web in the browser using a bundler. Since ONNX uses WebAssembly, it is neccesary to set up a custom webpack configuration.

Usage

git clone git@github.com:sahirgomez1/react-onnxruntime.git

Install all dependencies from the project root folder.

npm install

To compile the bundle run.

npm run build

This creates a dist folder with a bundle.min.js file, which containes all dependencies bundled and minified by webpack.

Make sure there is a script tag as the following <script src="./dist/bundle.min.js"></script> inside the index.html file.

Finally, to start the devServer run.

npm start

open your browser and navigate to the URL http://localhost:9000.

About

Running ONNXRuntime Web using Webpack to use WebAssembly

Resources

Stars

Watchers

Forks

Releases

No releases published