📖 Official documentation
Hugie is a Command Line Interface (CLI) for working with the Huggingface Inference Endpoints API (API docs)
The package is pip installable and can be installed from PyPI
pipx install hugie
HUGGINGFACE_READ_TOKEN
.
tldr; watch the video:
hugie
>>>
Usage: hugie [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
Commands:
config
endpoint
ui Open the Hugging Face Endpoints UI in a browser
version Print hugie version
hugie endpoint --help
>>>
Usage: hugie endpoint[OPTIONS] COMMAND[ARGS]...
Options:
--help Show this message and exit.
Commands:
create Create an endpoint
delete Delete an endpoint
info Get info about an endpoint
list List all the deployed endpoints
logs Get logs about an endpoint
test Test and endpoint
update Update an endpoint
To create an endpoint:
hugie endpoint create examples/development.json
To list all your endpoints:
hugie endpoint list
# Use --json option to view all content
hugie endpoint list --json
To update an endpoint, edit examples/development.json
hugie endpoint update development examples/development.json
To see the logs:
hugie endpoint logs development
To delete the endpoint
hugie endpoint delete development
this will ask you if you are sure you want to delete before moving forward. If
you want to force the deletion you can use --force
The endpoint create
and endpoint update
commands both require JSONs of the fomat:
{
"accountId": null,
"compute":
"accelerator": "cpu",
"instanceSize": "small",
"instanceType": "c6i",
"scaling": {
"maxReplica": 1,
"minReplica": 1
}
},
"model": {
"framework": "custom",
"image": {
"huggingface": {}
},
"repository": "t5-small",
"revision": "main",
"task": "text-classification"
},
"name": "aws-dev",
"provider": {
"region": "us-east-1",
"vendor": "aws"
},
"type": "protected"
}
See examples/development.json
for an example.
Read our CONTRIBUTING.md then
Create a virtual environment and install the package
poetry install
Run tests
pytest
To upload to PyPi run
`` poetry publish
you need the mantisnlp password to proceed. Ask Nick or Matt.