UNPKG

react-native-executorch

Version:

An easy way to run AI models in react native with ExecuTorch

18 lines (14 loc) 574 B
import { ObjectDetectionNativeModule } from '../../native/RnExecutorchModules'; import { ResourceSource } from '../../types/common'; import { BaseModule } from '../BaseModule'; export class ObjectDetectionModule extends BaseModule { protected static override nativeModule = ObjectDetectionNativeModule; static override async load(modelSource: ResourceSource) { return await super.load(modelSource); } static override async forward( input: string ): ReturnType<typeof this.nativeModule.forward> { return await this.nativeModule.forward(input); } }