React package for NimbleNet
Before installing, make sure your github account has access to the edge-sdk-react-native
npm package by following the instructions here to configure your project to authenticate to github and use the github npm registry.
Github npm registry authenticaton instructions
Install from the commandline
npm install @nimbleedge/nimblenet_react
Install via package.json
"@nimbleedge/nimblenet_react": "0.0.1"
import { NativeModules } from 'react-native';
const { NimbleNet } = NativeModules;
NimbleNet.initialize(
"client-id",
"client-secret",
["model_ids"],
"host",
"device_id",
["featureStores"]
)
import { NativeModules } from 'react-native';
const { NimbleNet } = NativeModules;
NimbleNet.initializeAsync(
"client-id",
"client-secret",
["model_ids"],
"host",
"device_id",
["featureStores"],
(result)=>{
if(result == Status.Success){
console.log("initializeAsync Success")
}else if(result == Status.Fallback){
console.log("initializeAsync Fallback")
}else {
console.log("initializeAsync Failed")
}
)
import { NativeModules } from 'react-native';
const { NimbleNet } = NativeModules;
let data = NimbleNet.predict("modelId", ["inputs"])
console.log("outputs", data[outputs])
import { NativeModules } from 'react-native';
const { NimbleNet } = NativeModules;
NimbleNet.predictAsync("modelId", ["inputs"],
(result, data)=>{
if(result == Status.Success){
console.log("predictAsync Success")
console.log("outputs", data[outputs])
}else if(result == Status.Fallback){
console.log("predictAsync Fallback")
}else {
console.log("predictAsync Failed")
}
}
)
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library