models

package
v0.264.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete added in v0.262.0

func Delete(dir, id string) error

Delete removes the repository id and all of its files from dir.

func Dir added in v0.262.0

func Dir() string

Dir returns the library of repositories downloaded from the Hub, ~/.infer/models/huggingface, one folder per owner and repository.

Types

type Downloaded added in v0.262.0

type Downloaded struct {
	ID    string `json:"id"`
	Path  string `json:"path"`
	Files int    `json:"files"`
	Bytes int64  `json:"bytes"`
}

Downloaded is a Hub repository in the library: where its files are and how much of it is on disk.

func Download added in v0.262.0

func Download(ctx context.Context, hub *huggingface.Client, dir, id string, only []string, report func(string)) (Downloaded, error)

Download fetches the repository id from the Hub into dir and returns what is on disk afterwards. only names the files to fetch, all of them when empty. A file that is already there is kept, so a stopped download resumes per file.

func List added in v0.262.0

func List(dir string) ([]Downloaded, error)

List returns every repository in dir that holds at least one file, sorted by id. A missing library is an empty one.

Jump to

Keyboard shortcuts

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