Spaces:
Running
Running
| title: Copper Group Dashboard | |
| emoji: π | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: streamlit | |
| sdk_version: "1.39.0" | |
| app_file: streamlit_app.py | |
| pinned: false | |
| hf_oauth: true | |
| hf_oauth_authorized_org: CB-Group | |
| hf_oauth_expiration_minutes: 480 | |
| # Copper Group Dashboard | |
| Internal dashboard for Copper Group restaurants (Copper Buffet + Tiew Copper). | |
| Data source: a private Hugging Face dataset repo | |
| (`CB-Group/CB-Dashboard-Data`), refreshed by | |
| `Optimized_Daily_Data_Collection.py` on the operations laptop. | |
| ## Access model | |
| - The Space is **public** so the URL resolves on any device, including | |
| mobile (where private-Space cookie scoping is unreliable). | |
| - Sign-in is **gated by HF OAuth**, restricted to members of the | |
| `CB-Group` organization (`hf_oauth_authorized_org`). Non-members | |
| hit the HF authorize page and get rejected before reaching our app. | |
| - (Optional) `ALLOWED_USERS` secret further narrows access to specific | |
| HF usernames inside the org β comma-separated, case-insensitive. | |
| - The dataset stays **private**; only the container's `HF_TOKEN` reads it. | |
| - Sessions last `hf_oauth_expiration_minutes` (default 8 hours). | |
| ## Space secrets required | |
| - `HF_REPO` β `CB-Group/CB-Dashboard-Data` | |
| - `HF_TOKEN` β fine-grained token with read access to that dataset | |
| - `ALLOWED_USERS` β (optional) `username1,username2,username3` | |
| `OAUTH_CLIENT_ID`, `OAUTH_CLIENT_SECRET`, `OPENID_PROVIDER_URL`, and | |
| `SPACE_HOST` are injected automatically by HF when `hf_oauth: true` is set β | |
| don't set them manually. | |