Dagger
Search

huggingface

DownloadRepo downloads a Huggingface repo and returns the Directory to the downloaded repo.
DownloadFile downloads a single file from Huggingface repo and returns the File.

Uses the Huggingface CLI to download the repos and files.

Installation

dagger install github.com/jozu-ai/daggerverse/huggingface@v0.1.0

Entrypoint

Return Type
Huggingface
Example
dagger -m github.com/jozu-ai/daggerverse/huggingface@a4e5e833af49ad44c91a94a28a2dfbafc5f49510 call \
func (m *myModule) example() *Huggingface  {
	return dag.
			Huggingface()
}
@function
def example() -> dag.Huggingface:
	return (
		dag.huggingface()
	)
@func()
example(): Huggingface {
	return dag
		.huggingface()
}

Types

Huggingface 🔗

downloadRepo() 🔗

Downloads a Huggingface repo and returns the Directory to the downloaded repo

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
hfrepoString !-the Huggingface repository to download.
secretSecret !-the Huggingface secret token for authentication
Example
dagger -m github.com/jozu-ai/daggerverse/huggingface@a4e5e833af49ad44c91a94a28a2dfbafc5f49510 call \
 download-repo --hfrepo string --secret env:MYSECRET
func (m *myModule) example(hfrepo string, secret *Secret) *Directory  {
	return dag.
			Huggingface().
			DownloadRepo(hfrepo, secret)
}
@function
def example(hfrepo: str, secret: dagger.Secret) -> dagger.Directory:
	return (
		dag.huggingface()
		.download_repo(hfrepo, secret)
	)
@func()
example(hfrepo: string, secret: Secret): Directory {
	return dag
		.huggingface()
		.downloadRepo(hfrepo, secret)
}

downloadFile() 🔗

Downloads a single file from Huggingface repo and returns the File

Return Type
File !
Arguments
NameTypeDefault ValueDescription
hfrepoString !-the Huggingface repository to download.
pathString !-The path of the file to download
secretSecret !-the Huggingface secret token for authentication
Example
dagger -m github.com/jozu-ai/daggerverse/huggingface@a4e5e833af49ad44c91a94a28a2dfbafc5f49510 call \
 download-file --hfrepo string --path string --secret env:MYSECRET
func (m *myModule) example(hfrepo string, path string, secret *Secret) *File  {
	return dag.
			Huggingface().
			DownloadFile(hfrepo, path, secret)
}
@function
def example(hfrepo: str, path: str, secret: dagger.Secret) -> dagger.File:
	return (
		dag.huggingface()
		.download_file(hfrepo, path, secret)
	)
@func()
example(hfrepo: string, path: string, secret: Secret): File {
	return dag
		.huggingface()
		.downloadFile(hfrepo, path, secret)
}