Download dashboard/src/api.js from ArshVerma/CodeLens: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/spaces/ArshVerma/CodeLens/resolve/b0c19e3ba94ca04e32c360fa0341e7e59cfb2279/dashboard/src/api.js
- Command line
-
hf download hf://spaces/ArshVerma/CodeLens@b0c19e3ba94ca04e32c360fa0341e7e59cfb2279/dashboard/src/api.js
-
curl -L -o api.js https://huggingface.co/spaces/ArshVerma/CodeLens/resolve/b0c19e3ba94ca04e32c360fa0341e7e59cfb2279/dashboard/src/api.js
384 Bytes
| const BASE = import.meta.env.DEV ? "/api" : ""; | |
| export const fetchHealth = () => fetch(`${BASE}/health`).then(r => r.json()); | |
| export const fetchStats = () => fetch(`${BASE}/stats`).then(r => r.json()); | |
| export const fetchLeaderboard = (taskId, limit = 10) => fetch(`${BASE}/leaderboard?task_id=${taskId}&limit=${limit}`) | |
| .then(r => r.json()) | |
| .then(data => data.entries || []); | |