Spaces:
Running
Running
Download scripts/sync_ort_assets.mjs from Yosun/TripoSplat-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/spaces/Yosun/TripoSplat-WebGPU/resolve/main/scripts/sync_ort_assets.mjs
- Command line
-
hf download hf://spaces/Yosun/TripoSplat-WebGPU/scripts/sync_ort_assets.mjs
-
curl -L -o sync_ort_assets.mjs https://huggingface.co/spaces/Yosun/TripoSplat-WebGPU/resolve/main/scripts/sync_ort_assets.mjs
512 Bytes
| import { mkdir, copyFile } from 'node:fs/promises' | |
| import { resolve } from 'node:path' | |
| const root = process.cwd() | |
| const srcDir = resolve(root, 'node_modules/onnxruntime-web/dist') | |
| const dstDir = resolve(root, 'public/ort') | |
| const files = [ | |
| 'ort-wasm-simd-threaded.asyncify.mjs', | |
| 'ort-wasm-simd-threaded.asyncify.wasm', | |
| ] | |
| await mkdir(dstDir, { recursive: true }) | |
| for (const file of files) { | |
| await copyFile(resolve(srcDir, file), resolve(dstDir, file)) | |
| } | |
| console.log(`Copied ORT web assets to ${dstDir}`) | |