UNPKG

react-native-executorch

Version:

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

16 lines (13 loc) 445 B
import { useModule } from '../useModule'; import { ImageSegmentationModule } from '../../modules/computer_vision/ImageSegmentationModule'; import { ResourceSource } from '../../types/common'; interface Props { model: { modelSource: ResourceSource }; preventLoad?: boolean; } export const useImageSegmentation = ({ model, preventLoad = false }: Props) => useModule({ module: ImageSegmentationModule, model, preventLoad, });