No public description
PiperOrigin-RevId: 570765754
This commit is contained in:
parent
d2baba6dbb
commit
1d8bd9c3ee
|
@ -28,6 +28,13 @@ mediapipe_ts_library(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "run_script_genrule",
|
||||||
|
srcs = ["fileset_resolver.ts.template"],
|
||||||
|
outs = ["fileset_resolver.ts"],
|
||||||
|
cmd = "cp $< $@",
|
||||||
|
)
|
||||||
|
|
||||||
mediapipe_ts_library(
|
mediapipe_ts_library(
|
||||||
name = "fileset_resolver",
|
name = "fileset_resolver",
|
||||||
srcs = ["fileset_resolver.ts"],
|
srcs = ["fileset_resolver.ts"],
|
||||||
|
|
|
@ -47,7 +47,7 @@ async function isSimdSupported(): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createFileset(
|
async function createFileset(
|
||||||
taskName: MediapipeTaskCategory, basePath?: string): Promise<WasmFileset> {
|
taskName: MediapipeTaskCategory, basePath = ''): Promise<WasmFileset> {
|
||||||
const suffix =
|
const suffix =
|
||||||
await isSimdSupported() ? 'wasm_internal' : 'wasm_nosimd_internal';
|
await isSimdSupported() ? 'wasm_internal' : 'wasm_nosimd_internal';
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ export class FilesetResolver {
|
||||||
* @return A `WasmFileset` that can be used to initialize MediaPipe Audio
|
* @return A `WasmFileset` that can be used to initialize MediaPipe Audio
|
||||||
* tasks.
|
* tasks.
|
||||||
*/
|
*/
|
||||||
static forAudioTasks(basePath = ''): Promise<WasmFileset> {
|
static forAudioTasks(basePath?: string): Promise<WasmFileset> {
|
||||||
return createFileset('audio', basePath);
|
return createFileset('audio', basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ export class FilesetResolver {
|
||||||
* @return A `WasmFileset` that can be used to initialize MediaPipe Text
|
* @return A `WasmFileset` that can be used to initialize MediaPipe Text
|
||||||
* tasks.
|
* tasks.
|
||||||
*/
|
*/
|
||||||
static forTextTasks(basePath = ''): Promise<WasmFileset> {
|
static forTextTasks(basePath?: string): Promise<WasmFileset> {
|
||||||
return createFileset('text', basePath);
|
return createFileset('text', basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ export class FilesetResolver {
|
||||||
* @return A `WasmFileset` that can be used to initialize MediaPipe Vision
|
* @return A `WasmFileset` that can be used to initialize MediaPipe Vision
|
||||||
* tasks.
|
* tasks.
|
||||||
*/
|
*/
|
||||||
static forVisionTasks(basePath = ''): Promise<WasmFileset> {
|
static forVisionTasks(basePath?: string): Promise<WasmFileset> {
|
||||||
return createFileset('vision', basePath);
|
return createFileset('vision', basePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user