UNPKG

react-native-executorch

Version:

An easy way to run AI models in React Native with ExecuTorch

24 lines (23 loc) 767 B
"use strict"; import { VerticalOCRController } from '../../controllers/VerticalOCRController'; export class VerticalOCRModule { constructor() { this.controller = new VerticalOCRController(); } async load(model, independentCharacters, onDownloadProgressCallback = () => {}) { await this.controller.load({ detectorLarge: model.detectorLarge, detectorNarrow: model.detectorNarrow }, { recognizerLarge: model.recognizerLarge, recognizerSmall: model.recognizerSmall }, model.language, independentCharacters, onDownloadProgressCallback); } async forward(imageSource) { return await this.controller.forward(imageSource); } delete() { this.controller.delete(); } } //# sourceMappingURL=VerticalOCRModule.js.map