diff --git a/mediapipe/tasks/web/audio/index.ts b/mediapipe/tasks/web/audio/index.ts index dbad8c617..44fa7eb25 100644 --- a/mediapipe/tasks/web/audio/index.ts +++ b/mediapipe/tasks/web/audio/index.ts @@ -14,6 +14,14 @@ * limitations under the License. */ -export * from '../../../tasks/web/audio/audio_classifier/audio_classifier'; -export * from '../../../tasks/web/audio/audio_embedder/audio_embedder'; -export * from '../../../tasks/web/core/fileset_resolver'; +import {AudioClassifier as AudioClassifierImpl} from '../../../tasks/web/audio/audio_classifier/audio_classifier'; +import {AudioEmbedder as AudioEmbedderImpl} from '../../../tasks/web/audio/audio_embedder/audio_embedder'; +import {FilesetResolver as FilesetResolverImpl} from '../../../tasks/web/core/fileset_resolver'; + +// Declare the variables locally so that Rollup in OSS includes them explcilty +// as exports. +const AudioClassifier = AudioClassifierImpl; +const AudioEmbedder = AudioEmbedderImpl; +const FilesetResolver = FilesetResolverImpl; + +export {AudioClassifier, AudioEmbedder, FilesetResolver}; diff --git a/mediapipe/tasks/web/text/index.ts b/mediapipe/tasks/web/text/index.ts index f32c16c36..2c9e6fead 100644 --- a/mediapipe/tasks/web/text/index.ts +++ b/mediapipe/tasks/web/text/index.ts @@ -14,6 +14,14 @@ * limitations under the License. */ -export * from '../../../tasks/web/core/fileset_resolver'; -export * from '../../../tasks/web/text/text_classifier/text_classifier'; -export * from '../../../tasks/web/text/text_embedder/text_embedder'; +import {FilesetResolver as FilesetResolverImpl} from '../../../tasks/web/core/fileset_resolver'; +import {TextClassifier as TextClassifierImpl} from '../../../tasks/web/text/text_classifier/text_classifier'; +import {TextEmbedder as TextEmbedderImpl} from '../../../tasks/web/text/text_embedder/text_embedder'; + +// Declare the variables locally so that Rollup in OSS includes them explcilty +// as exports. +const FilesetResolver = FilesetResolverImpl; +const TextClassifier = TextClassifierImpl; +const TextEmbedder = TextEmbedderImpl; + +export {FilesetResolver, TextClassifier, TextEmbedder}; diff --git a/mediapipe/tasks/web/vision/index.ts b/mediapipe/tasks/web/vision/index.ts index 2ba6ca812..e13f8183f 100644 --- a/mediapipe/tasks/web/vision/index.ts +++ b/mediapipe/tasks/web/vision/index.ts @@ -14,9 +14,27 @@ * limitations under the License. */ -export * from '../../../tasks/web/core/fileset_resolver'; -export * from '../../../tasks/web/vision/gesture_recognizer/gesture_recognizer'; -export * from '../../../tasks/web/vision/hand_landmarker/hand_landmarker'; -export * from '../../../tasks/web/vision/image_classifier/image_classifier'; -export * from '../../../tasks/web/vision/image_embedder/image_embedder'; -export * from '../../../tasks/web/vision/object_detector/object_detector'; +import {FilesetResolver as FilesetResolverImpl} from '../../../tasks/web/core/fileset_resolver'; +import {GestureRecognizer as GestureRecognizerImpl} from '../../../tasks/web/vision/gesture_recognizer/gesture_recognizer'; +import {HandLandmarker as HandLandmarkerImpl} from '../../../tasks/web/vision/hand_landmarker/hand_landmarker'; +import {ImageClassifier as ImageClassifierImpl} from '../../../tasks/web/vision/image_classifier/image_classifier'; +import {ImageEmbedder as ImageEmbedderImpl} from '../../../tasks/web/vision/image_embedder/image_embedder'; +import {ObjectDetector as ObjectDetectorImpl} from '../../../tasks/web/vision/object_detector/object_detector'; + +// Declare the variables locally so that Rollup in OSS includes them explcilty +// as exports. +const FilesetResolver = FilesetResolverImpl; +const GestureRecognizer = GestureRecognizerImpl; +const HandLandmarker = HandLandmarkerImpl; +const ImageClassifier = ImageClassifierImpl; +const ImageEmbedder = ImageEmbedderImpl; +const ObjectDetector = ObjectDetectorImpl; + +export { + FilesetResolver, + GestureRecognizer, + HandLandmarker, + ImageClassifier, + ImageEmbedder, + ObjectDetector +};