Spaces:
Sleeping
Sleeping
Download src/init-env.js from milwright/cloze-reader: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/spaces/milwright/cloze-reader/resolve/main/src/init-env.js
- Command line
-
hf download hf://spaces/milwright/cloze-reader/src/init-env.js
-
curl -L -o init-env.js https://huggingface.co/spaces/milwright/cloze-reader/resolve/main/src/init-env.js
488 Bytes
| // Initialize environment variables from meta tags | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const openrouterMeta = document.querySelector('meta[name="openrouter-key"]'); | |
| const hfMeta = document.querySelector('meta[name="hf-key"]'); | |
| if (openrouterMeta && openrouterMeta.content) { | |
| window.OPENROUTER_API_KEY = openrouterMeta.content; | |
| } else { | |
| } | |
| if (hfMeta && hfMeta.content) { | |
| window.HF_API_KEY = hfMeta.content; | |
| } | |
| }); |