react-native-executorch
Version:
An easy way to run AI models in React Native with ExecuTorch
64 lines (56 loc) • 3.13 kB
JavaScript
;
import { ETInstallerNativeModule } from './native/RnExecutorchModules';
// eslint-disable no-var
// eslint-disable no-var
if (global.loadStyleTransfer == null || global.loadImageSegmentation == null || global.loadTextToImage == null || global.loadExecutorchModule == null || global.loadClassification == null || global.loadObjectDetection == null || global.loadTokenizerModule == null || global.loadTextEmbeddings == null || global.loadImageEmbeddings == null || global.loadVAD == null || global.loadLLM == null || global.loadSpeechToText == null || global.loadOCR == null || global.loadVerticalOCR == null) {
if (!ETInstallerNativeModule) {
throw new Error(`Failed to install react-native-executorch: The native module could not be found.`);
}
ETInstallerNativeModule.install();
}
// hooks
export * from './hooks/computer_vision/useClassification';
export * from './hooks/computer_vision/useObjectDetection';
export * from './hooks/computer_vision/useStyleTransfer';
export * from './hooks/computer_vision/useImageSegmentation';
export * from './hooks/computer_vision/useOCR';
export * from './hooks/computer_vision/useVerticalOCR';
export * from './hooks/computer_vision/useImageEmbeddings';
export * from './hooks/computer_vision/useTextToImage';
export * from './hooks/natural_language_processing/useLLM';
export * from './hooks/natural_language_processing/useSpeechToText';
export * from './hooks/natural_language_processing/useTextEmbeddings';
export * from './hooks/natural_language_processing/useTokenizer';
export * from './hooks/natural_language_processing/useVAD';
export * from './hooks/general/useExecutorchModule';
// modules
export * from './modules/computer_vision/ClassificationModule';
export * from './modules/computer_vision/ObjectDetectionModule';
export * from './modules/computer_vision/StyleTransferModule';
export * from './modules/computer_vision/ImageSegmentationModule';
export * from './modules/computer_vision/OCRModule';
export * from './modules/computer_vision/VerticalOCRModule';
export * from './modules/computer_vision/ImageEmbeddingsModule';
export * from './modules/computer_vision/TextToImageModule';
export * from './modules/natural_language_processing/LLMModule';
export * from './modules/natural_language_processing/SpeechToTextModule';
export * from './modules/natural_language_processing/TextEmbeddingsModule';
export * from './modules/natural_language_processing/TokenizerModule';
export * from './modules/natural_language_processing/VADModule';
export * from './modules/general/ExecutorchModule';
// utils
export * from './utils/ResourceFetcher';
export * from './utils/llm';
// types
export * from './types/objectDetection';
export * from './types/ocr';
export * from './types/imageSegmentation';
export * from './types/llm';
export * from './types/vad';
export * from './types/common';
export { SpeechToTextLanguage, SpeechToTextModelConfig, DecodingOptions } from './types/stt';
// constants
export * from './constants/modelUrls';
export * from './constants/ocr/models';
export * from './constants/llmDefaults';
//# sourceMappingURL=index.js.map