Spaces:
Running
Running
| import { DATASET } from '$lib/types'; | |
| const REF = 'main'; | |
| export type FetchOpts = { fetch?: typeof fetch; signal?: AbortSignal }; | |
| /** Build a `huggingface.co/datasets/<repo>/resolve/main/<path>` URL. */ | |
| export function resolveUrl(repoPath: string): string { | |
| return `https://huggingface.co/datasets/${DATASET}/resolve/${REF}/${repoPath}`; | |
| } | |