UNPKG

react-native-executorch

Version:

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

19 lines (18 loc) 747 B
"use strict"; import { VerticalOCRController } from '../../controllers/VerticalOCRController'; export class VerticalOCRModule { static onDownloadProgressCallback = _downloadProgress => {}; static async load(detectorSources, recognizerSources, language = 'en', independentCharacters = false) { this.module = new VerticalOCRController({ modelDownloadProgressCallback: this.onDownloadProgressCallback }); await this.module.loadModel(detectorSources, recognizerSources, language, independentCharacters); } static async forward(input) { return await this.module.forward(input); } static onDownloadProgress(callback) { this.onDownloadProgressCallback = callback; } } //# sourceMappingURL=VerticalOCRModule.js.map