Spaces:
Running
Running
|
Download README.md from noodcon/Training-Process: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/spaces/noodcon/Training-Process/resolve/main/README.md
- Command line
-
hf download hf://spaces/noodcon/Training-Process/README.md
-
curl -L -o README.md https://huggingface.co/spaces/noodcon/Training-Process/resolve/main/README.md
2.15 kB
metadata
title: Training Process
emoji: π
colorFrom: gray
colorTo: red
sdk: static
pinned: false
license: mit
RL Training Dashboard (static)
Plain HTML, CSS and JavaScript. No build step, no React. Public visitors see the data. The owner (mondk) signs in with Hugging Face and can edit the cost counter, notices, about text and raw JSON.
Files
index.html: entry pagestyle.css: dark theme, light toggleconfig.js: constants (client ID, owner, data repo, timezones)cost.js: cost counter math (pure functions)hf.js: Hugging Face login (PKCE), read and write ofdashboard.jsonapp.js: rendering, charts, admin panels
Setup
- Create the OAuth app (logged in as
mondk): huggingface.co β Settings β Applications β New OAuth application.- Redirect URLs: add
http://localhost:8000/(for local testing) and the Space URL, for examplehttps://noodcon-training-process.hf.space/. The URL must match exactly, including the trailing slash. - Scopes:
openid,profile,write-repos. - Copy the Client ID.
- Redirect URLs: add
- Fill in
config.js: setHF_OAUTH_CLIENT_ID. Check thatOWNER_HF_USERNAMEismondkandDATA_REPOismondk/Test. - Upload the files to the Space: open the Space, go to Files β Add file β Upload files, and upload every file in this folder (or push them with git). Keep the files at the root of the repo.
- Open the direct URL
https://<space-name>.hf.spaceand not the preview inside huggingface.co. The preview is an iframe and can block the login session.
Test locally
Run a small server from this folder, not by double-clicking index.html (modules and OAuth need http):
python3 -m http.server 8000
Then open http://localhost:8000.
Notes
- The dataset
mondk/Testis public. Do not put tokens or private data indashboard.json. - Admin edits save as a commit to the dataset. Visitors see them within
REFRESH_MS(30 s). - The owner's token is kept in
sessionStorageand is removed by Log out or when the tab closes. - If the browser blocks reading
dashboard.json(CORS), tell me and I will switch the read path.