Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 940 Bytes

react-native.md

File metadata and controls

46 lines (32 loc) · 940 Bytes
title parent grand_parent has_children nav_order
React Native
JavaScript
Get Started
false
3

Get started with ONNX Runtime for React Native

Contents

{: .no_toc }

  • TOC placeholder {:toc}

Install

# install latest release version
npm install onnxruntime-react-native

Import

// use ES6 style import syntax (recommended)
import * as ort from 'onnxruntime-react-native';
// or use CommonJS style import syntax
const ort = require('onnxruntime-react-native');

Enable ONNX Runtime Extensions for React Native

To enable support for ONNX Runtime Extensions in your React Native app, you need to specify the following configuration as a top-level entry (note: usually where the package nameand versionfields are) in your project's root directory package.json file.

"onnxruntimeExtensionsEnabled": "true"