Spaces:
Running
Running
Download termworker.js from WeReCooking/DR-Tulu2-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/spaces/WeReCooking/DR-Tulu2-WebGPU/resolve/main/termworker.js
- Command line
-
hf download hf://spaces/WeReCooking/DR-Tulu2-WebGPU/termworker.js
-
curl -L -o termworker.js https://huggingface.co/spaces/WeReCooking/DR-Tulu2-WebGPU/resolve/main/termworker.js
374 Bytes
| // Runs the webterminal filters (tools.js runPipeline) off the main thread so a runaway regex can be terminated. | |
| import { runPipeline, RegexError } from './tools.js'; | |
| onmessage = ({ data }) => { | |
| try { postMessage({ ok: true, text: runPipeline(data.stages, data.text) }); } | |
| catch (e) { postMessage({ ok: false, message: e.message, regex: e instanceof RegexError }); } | |
| }; | |