{"id":15396649,"url":"https://github.com/hupe1980/go-huggingface","last_synced_at":"2025-04-16T01:09:19.029Z","repository":{"id":176690395,"uuid":"658242460","full_name":"hupe1980/go-huggingface","owner":"hupe1980","description":"🤗 Hugging Face Inference Client written in Go","archived":false,"fork":false,"pushed_at":"2024-01-07T20:43:45.000Z","size":66,"stargazers_count":48,"open_issues_count":6,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T01:06:59.429Z","etag":null,"topics":["golang","huggingface","inference-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hupe1980.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-25T07:39:10.000Z","updated_at":"2025-04-15T09:55:21.000Z","dependencies_parsed_at":"2024-10-19T03:28:47.099Z","dependency_job_id":null,"html_url":"https://github.com/hupe1980/go-huggingface","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"bb938f9f0082ca98353afb6d671680a283534e07"},"previous_names":["hupe1980/go-huggingface"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgo-huggingface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgo-huggingface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgo-huggingface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Fgo-huggingface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hupe1980","download_url":"https://codeload.github.com/hupe1980/go-huggingface/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249178211,"owners_count":21225349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","huggingface","inference-api"],"created_at":"2024-10-01T15:34:29.043Z","updated_at":"2025-04-16T01:09:18.934Z","avatar_url":"https://github.com/hupe1980.png","language":"Go","funding_links":[],"categories":["API SDKs"],"sub_categories":[],"readme":"# 🤗 go-huggingface\n![Build Status](https://github.com/hupe1980/go-huggingface/workflows/build/badge.svg) \n[![Go Reference](https://pkg.go.dev/badge/github.com/hupe1980/go-huggingface.svg)](https://pkg.go.dev/github.com/hupe1980/go-huggingface)\n\u003e The Hugging Face Inference Client in Golang is a modul designed to interact with the Hugging Face model repository and perform inference tasks using state-of-the-art natural language processing models. Developed in Golang, it provides a seamless and efficient way to integrate Hugging Face models into your Golang applications.\n\n## Installation\n```\ngo get github.com/hupe1980/go-huggingface\n```\n\n## How to use\n```golang\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/hupe1980/go-huggingface\"\n)\n\nfunc main() {\n\tic := huggingface.NewInferenceClient(os.Getenv(\"HUGGINGFACEHUB_API_TOKEN\"))\n\n\tres, err := ic.ZeroShotClassification(context.Background(), \u0026huggingface.ZeroShotClassificationRequest{\n\t\tInputs: []string{\"Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!\"},\n\t\tParameters: huggingface.ZeroShotClassificationParameters{\n\t\t\tCandidateLabels: []string{\"refund\", \"faq\", \"legal\"},\n\t\t},\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(res[0].Sequence)\n\tfmt.Println(\"Labels:\", res[0].Labels)\n\tfmt.Println(\"Scores:\", res[0].Scores)\n}\n```\nOutput:\n```text\nHi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!\nLabels: [refund faq legal]\nScores: [0.8777876496315002 0.10522633790969849 0.016985949128866196]\n```\n\nFor more example usage, see [_examples](./_examples).\n\n## License\n[MIT](LICENCE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fgo-huggingface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhupe1980%2Fgo-huggingface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Fgo-huggingface/lists"}