Dagger
Search

huggingface

No long description provided.

Installation

dagger install github.com/jozu-ai/modelkit-factory/modules/huggingface@2ab3486c8cb4a2ef8eccabd5ab8ba441e74f6b69

Entrypoint

Return Type
Huggingface
Example
dagger -m github.com/jozu-ai/modelkit-factory/modules/huggingface@2ab3486c8cb4a2ef8eccabd5ab8ba441e74f6b69 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/modelkit-factory/modules/huggingface@2ab3486c8cb4a2ef8eccabd5ab8ba441e74f6b69 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/modelkit-factory/modules/huggingface@2ab3486c8cb4a2ef8eccabd5ab8ba441e74f6b69 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)
}