From 20d66ef05428d94adabaaa53a0c08edc4b1e3446 Mon Sep 17 00:00:00 2001 From: Google AI Edge Date: Fri, 13 Dec 2024 17:34:05 -0800 Subject: [PATCH] internal change PiperOrigin-RevId: 706056114 --- src/ui/src/common/types.ts | 1 + src/ui/src/services/internal_adapter_extensions.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/ui/src/common/types.ts b/src/ui/src/common/types.ts index 31859d1f..f63325ae 100644 --- a/src/ui/src/common/types.ts +++ b/src/ui/src/common/types.ts @@ -36,6 +36,7 @@ export enum InternalAdapterExtId { MLIR = 'builtin_mlir', JSON_LOADER = 'builtin_json', DATA_NEXUS = 'builtin_data_nexus', + MEDIAPIPE = 'builtin_mediapipe', } /** Extension types. */ diff --git a/src/ui/src/services/internal_adapter_extensions.ts b/src/ui/src/services/internal_adapter_extensions.ts index e87ba521..a9785904 100644 --- a/src/ui/src/services/internal_adapter_extensions.ts +++ b/src/ui/src/services/internal_adapter_extensions.ts @@ -88,6 +88,15 @@ const dataNexusAdapterExtension: AdapterExtension = { name: 'Data Nexus adapter', description: 'Loads data from Data Nexus.', }; +const mediapipeAdapterExtension: AdapterExtension = { + type: ExtensionType.ADAPTER, + fileExts: ['pbtxt'], + id: InternalAdapterExtId.MEDIAPIPE, + matchGoogleStorageDir: true, // Also accept an entire directory. + name: 'MediaPipe adapter', + description: + 'A built-in adapter that converts a MediaPipe Pipeline to Model Explorer format.', +}; /** All internal extensions. */ export const INTERNAL_ADAPTER_EXTENSIONS: AdapterExtension[] = [ @@ -99,4 +108,5 @@ export const INTERNAL_ADAPTER_EXTENSIONS: AdapterExtension[] = [ mlirAdapterExtension, jsonAdapterExtension, dataNexusAdapterExtension, + mediapipeAdapterExtension, ];