hf

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL