Download frontends/react/src/pyodide.worker.ts from elvis-hf/attention: direct link, hf CLI and curl.
- Browser
- Download file 454 Bytes
-
https://huggingface.co/spaces/elvis-hf/attention/resolve/main/frontends/react/src/pyodide.worker.ts
- Command line
-
hf download hf://spaces/elvis-hf/attention/frontends/react/src/pyodide.worker.ts
-
curl -L -o pyodide.worker.ts https://huggingface.co/spaces/elvis-hf/attention/resolve/main/frontends/react/src/pyodide.worker.ts
454 Bytes
| import { exposePython } from "@elvis/pyodide/worker"; | |
| import managerCode from "../../../backend/src/manager.py?raw"; | |
| import logicCode from "../../../backend/src/logic.py?raw"; | |
| exposePython({ | |
| packages: ["numpy"], | |
| files: { | |
| "manager.py": managerCode, | |
| "logic.py": logicCode, | |
| "en-zh.npz": new URL("../../../backend/models/en-zh.npz", import.meta.url), | |
| "en-fr.npz": new URL("../../../backend/models/en-fr.npz", import.meta.url), | |
| }, | |
| }); | |