{"id":15014034,"url":"https://github.com/explosion/spacy-huggingface-hub","last_synced_at":"2025-10-19T14:31:59.103Z","repository":{"id":45494073,"uuid":"383081332","full_name":"explosion/spacy-huggingface-hub","owner":"explosion","description":"🤗 Push your spaCy pipelines to the Hugging Face Hub","archived":false,"fork":false,"pushed_at":"2024-06-02T17:02:18.000Z","size":84,"stargazers_count":43,"open_issues_count":5,"forks_count":15,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-28T20:46:00.236Z","etag":null,"topics":["huggingface","machine-learning","ml-models","models","natural-language-processing","nlp","spacy"],"latest_commit_sha":null,"homepage":"","language":"Python","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/explosion.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":"2021-07-05T09:14:04.000Z","updated_at":"2024-11-01T03:09:22.000Z","dependencies_parsed_at":"2024-06-19T22:59:32.670Z","dependency_job_id":null,"html_url":"https://github.com/explosion/spacy-huggingface-hub","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fspacy-huggingface-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fspacy-huggingface-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fspacy-huggingface-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fspacy-huggingface-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explosion","download_url":"https://codeload.github.com/explosion/spacy-huggingface-hub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237152769,"owners_count":19263780,"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":["huggingface","machine-learning","ml-models","models","natural-language-processing","nlp","spacy"],"created_at":"2024-09-24T19:45:05.501Z","updated_at":"2025-10-19T14:31:53.784Z","avatar_url":"https://github.com/explosion.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://explosion.ai\"\u003e\u003cimg src=\"https://explosion.ai/assets/img/logo.svg\" width=\"125\" height=\"125\" align=\"right\" /\u003e\u003c/a\u003e\n\n# spacy-huggingface-hub: Push your spaCy pipelines to the Hugging Face Hub\n\nThis package provides a CLI command for uploading any trained spaCy pipeline packaged with [`spacy package`](https://spacy.io/api/cli#package) to the [Hugging Face Hub](https://huggingface.co/). It auto-generates all meta information for you, uploads a pretty README (requires spaCy v3.1+) and handles version control under the hood.\n\n[![PyPi](https://img.shields.io/pypi/v/spacy-huggingface-hub.svg?style=flat-square\u0026logo=pypi\u0026logoColor=white)](https://pypi.python.org/pypi/spacy-huggingface-hub)\n[![GitHub](https://img.shields.io/github/release/explosion/spacy-huggingface-hub/all.svg?style=flat-square\u0026logo=github)](https://github.com/explosion/spacy-huggingface-hub/releases)\n\n## 🤗 About the Hugging Face Hub\n\nThe [Hugging Face Hub](https://huggingface.co/) hosts Git-based repositories which are storage spaces that can contain all your files. These repositories have multiple advantages: **versioning** (commit history and diffs), **branches**, useful **metadata** about their tasks, languages, metrics and more, browser-based **visualizers** to explore the models interactively in your browser, as well as an **API** to use the models in production.\n\n## 🚀 Quickstart\n\nYou can install `spacy-huggingface-hub` from pip:\n\n```bash\npip install spacy-huggingface-hub\n```\n\nTo check if the command has been registered successfully:\n\n```bash\npython -m spacy huggingface-hub --help\n```\n\n\nYou can upload any pipeline packaged with [`spacy package`](https://spacy.io/api/cli#package). Make sure to set `--build wheel` to output a binary `.whl` file. The uploader will read all metadata from the pipeline package, including the auto-generated pretty `README.md` and the model details available in the `meta.json`.\n\n```bash\nhuggingface-cli login\npython -m spacy package ./en_ner_fashion ./output --build wheel\ncd ./output/en_ner_fashion-0.0.0/dist\npython -m spacy huggingface-hub push en_ner_fashion-0.0.0-py3-none-any.whl\n```\n\nThe command will output two things:\n\n- Where to find your repo in the Hub! For example, https://huggingface.co/spacy/en_core_web_sm\n- And how to install the pipeline directly from the Hub!\n\n```bash\npip install https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl\n```\n\nNow you can share your pipelines very quickly with others. Additionally, you can also test your pipeline directly in the browser!\n\n![Image of browser widget](https://user-images.githubusercontent.com/13643239/124529281-7e9a1b00-de0a-11eb-9069-093e3021a307.png)\n\n## ⚙️ Usage and API\n\nIf spaCy is already installed in the same environment, this package automatically adds the `spacy huggingface-hub` commands to the CLI. If you don't have spaCy installed, you can also execute the CLI directly via the package.\n\n### `push`\n\n```bash\npython -m spacy huggingface-hub push [whl_path] [--org] [--msg] [--local-repo] [--verbose]\n```\n\n```bash\npython -m spacy_huggingface_hub push [whl_path] [--org] [--msg] [--local-repo] [--verbose]\n```\n\n| Argument             | Type         | Description                                                                                                                   |\n| -------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------- |\n| `whl_path`           | str / `Path` | The path to the `.whl` file packaged with [`spacy package`](https://spacy.io/api/cli#package).                                |\n| `--org`, `-o`        | str          | Optional name of organization to which the pipeline should be uploaded.                                                       |\n| `--msg`, `-m`        | str          | Commit message to use for update. Defaults to `\"Update spaCy pipeline\"`.                                                      |\n| `--verbose`, `-V`    | bool         | Output additional info for debugging, e.g. the full generated hub metadata.                                                   |\n\n### Usage from Python\n\nInstead of using the CLI, you can also call the `push` function from Python. It returns a dictionary containing the `\"url\"` of the published model and the `\"whl_url\"` of the wheel file, which you can install with `pip install`\n\n```python\nfrom spacy_huggingface_hub import push\n\nresult = push(\"./en_ner_fashion-0.0.0-py3-none-any.whl\")\nprint(result[\"url\"])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fspacy-huggingface-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplosion%2Fspacy-huggingface-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fspacy-huggingface-hub/lists"}