Spaces:
Paused
Paused
Download check_space.js from dimensionalpulsar/caja: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/spaces/dimensionalpulsar/caja/resolve/main/check_space.js
- Command line
-
hf download hf://spaces/dimensionalpulsar/caja/check_space.js
-
curl -L -o check_space.js https://huggingface.co/spaces/dimensionalpulsar/caja/resolve/main/check_space.js
529 Bytes
| import fs from 'fs'; | |
| import path from 'path'; | |
| const TOKEN = process.env.HF_TOKEN || "hf_TOKEN_PLACEHOLDER"; | |
| const REPO = "dimensionalpulsar/caja"; | |
| const API_URL = `https://huggingface.co/api/spaces/${REPO}`; | |
| console.log(`Checking Hugging Face Space: ${REPO}...`); | |
| async function checkSpace() { | |
| const res = await fetch(API_URL, { | |
| headers: { | |
| "Authorization": `Bearer ${TOKEN}` | |
| } | |
| }); | |
| const data = await res.json(); | |
| console.log("Space Status / Info:", data.id || data); | |
| } | |
| checkSpace().catch(console.error); | |