react-native-executorch
Version:
An easy way to run AI models in React Native with ExecuTorch
22 lines (21 loc) • 692 B
TypeScript
import { ResourceSource } from '../../types/common';
import { OCRDetection, OCRLanguage } from '../../types/ocr';
interface OCRModule {
error: string | null;
isReady: boolean;
isGenerating: boolean;
forward: (input: string) => Promise<OCRDetection[]>;
downloadProgress: number;
}
export declare const useVerticalOCR: ({ model, independentCharacters, preventLoad, }: {
model: {
detectorLarge: ResourceSource;
detectorNarrow: ResourceSource;
recognizerLarge: ResourceSource;
recognizerSmall: ResourceSource;
language: OCRLanguage;
};
independentCharacters?: boolean;
preventLoad?: boolean;
}) => OCRModule;
export {};