Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFiles ¶
func DownloadFiles( ctx context.Context, modelRepo, repoRef, destDir string, files []kfgen.FileListing, token string, maxConcurrency int, repoType RepositoryType) error
func ListFiles ¶
func ListFiles(ctx context.Context, modelRepo, ref string, token string, repoType RepositoryType) (*kfgen.DirectoryListing, error)
Types ¶
type RepositoryType ¶
type RepositoryType int
RepositoryType represents the kind of Hugging Face repository.
const ( RepoTypeUnknown RepositoryType = iota RepoTypeModel RepoTypeDataset )
func ParseHuggingFaceRepo ¶
func ParseHuggingFaceRepo(rawURL string) (string, RepositoryType, error)
ParseHuggingFaceRepo parses a Hugging Face repository URL or path and returns the normalized repository path (org/repo) and the repository type.
Click to show internal directories.
Click to hide internal directories.