Publish to Hugging Face
The huggingface/ directory holds everything needed to publish vaak artefacts to the Hugging Face Hub:
huggingface/ space/ Gradio app that wraps vaak for a hosted demo model_card/ README.md template for fine-tuned checkpoints publish.py Uploads a model, a Space, or bothPrerequisites
Section titled “Prerequisites”pip install "vaak[whisper]" huggingface_hub gradiohuggingface-cli loginThe token needs write access.
Publish a model
Section titled “Publish a model”After fine-tuning with --merge, train/out/ holds the adapter
(whisper-small-hi-lora) and the merged full model (whisper-small-hi-merged).
python huggingface/publish.py --adapter --merged --namespace <your-user>The script:
- Creates the repos if they do not exist (
<your-user>/vaak-whisper-small-hi-loraand<your-user>/vaak-whisper-small-hiby default; override with--adapter-idand--merged-id). - Renders
huggingface/model_card/README.md, filling in the base model, training data, hardware and the before/after WER and CER fromtrain/out/eval.json. Placeholders that cannot be filled are printed so you can edit them by hand before publishing. - Uploads the weights, tokenizer, feature extractor and card.
The card template states that the model is a LoRA fine-tune of an upstream checkpoint and
links to the upstream licence. Keep that; it is required by the Whisper licence terms and it
is honest. Use --dry-run to see the rendered card and the planned actions without uploading.
Load it back:
vaak transcribe clip.mp3 --model hf-whisper:<your-user>/vaak-whisper-small-hi --language hiPublish the demo Space
Section titled “Publish the demo Space”The Space in huggingface/space/ is a Gradio app with a file upload, a microphone input and
a language dropdown. It calls faster-whisper directly (Whisper small, int8) so the free CPU
tier builds in a minute without pulling the whole vaak package.
python huggingface/publish.py --space --namespace <your-user>- The Space id defaults to
<your-user>/vaak-demo; override with--space-id. - Set
VAAK_WHISPER_SIZE(tiny, base, small, medium, large-v3-turbo) andVAAK_COMPUTE_TYPEin the Space settings to change the model without editing code. huggingface/space/requirements.txtpins onlygradioandfaster-whisper. GPU tiers cost money per hour while the Space is awake, so set it to sleep after inactivity.
Publish everything
Section titled “Publish everything”python huggingface/publish.py --all --namespace <your-user>Checklist
Section titled “Checklist”- Model card says which upstream model and licence it derives from
- Benchmark rows in the card come from a
bench/results/*.jsonfile, not typed by hand - Space model fits the chosen hardware
- Space is set to sleep after inactivity if it runs on paid hardware