Download frontend/src/components/modelStatus.ts from build-small-hackathon/world-simulator: direct link, hf CLI and curl.
- Browser
- Download file 677 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/world-simulator/resolve/main/frontend/src/components/modelStatus.ts
- Command line
-
hf download hf://spaces/build-small-hackathon/world-simulator/frontend/src/components/modelStatus.ts
-
curl -L -o modelStatus.ts https://huggingface.co/spaces/build-small-hackathon/world-simulator/resolve/main/frontend/src/components/modelStatus.ts
677 Bytes
| export function shortModelLabel(label: string): string { | |
| return label; | |
| } | |
| export function formatModelStatus(status: string): string { | |
| switch (status) { | |
| case "checking": | |
| return "checking"; | |
| case "warmup": | |
| return "warmup"; | |
| case "ready": | |
| return "ready"; | |
| case "error": | |
| return "error"; | |
| default: | |
| return "unknown"; | |
| } | |
| } | |
| export function modelStatusClass(status: string): string { | |
| switch (status) { | |
| case "ready": | |
| return "modelStatusReady"; | |
| case "checking": | |
| case "warmup": | |
| return "modelStatusWarmup"; | |
| case "error": | |
| return "modelStatusError"; | |
| default: | |
| return "modelStatusUnknown"; | |
| } | |
| } | |