Download src/lib/hubViewer.ts from lerobot/LeLab: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/lerobot/LeLab/resolve/main/src/lib/hubViewer.ts
- Command line
-
hf download hf://spaces/lerobot/LeLab/src/lib/hubViewer.ts
-
curl -L -o hubViewer.ts https://huggingface.co/spaces/lerobot/LeLab/resolve/main/src/lib/hubViewer.ts
477 Bytes
| /** Open a Hub dataset in the visualize_dataset Space (private ones go through the login redirect). */ | |
| export const openHubViewer = (repoId: string, isPrivate: boolean) => { | |
| const spacePath = `/spaces/lerobot/visualize_dataset?path=${encodeURIComponent(`/${repoId}`)}`; | |
| const target = isPrivate | |
| ? `https://huggingface.co/login?next=${encodeURIComponent(spacePath)}` | |
| : `https://huggingface.co${spacePath}`; | |
| window.open(target, "_blank", "noopener,noreferrer"); | |
| }; | |