chiaseacc's picture
Upload folder using huggingface_hub
c67e924 verified
|
Raw History Blame Contribute Delete
1.16 kB

Uploading to Hugging Face

  1. Create a write token at https://huggingface.co/settings/tokens.
  2. Replace <you> (GitHub) and <user> (Hugging Face) placeholders in README.md.

Option A: script

export HF_TOKEN=hf_xxx
./upload.sh <your-hf-username>

Option B: Python

import os
from huggingface_hub import HfApi
api = HfApi(token=os.environ["HF_TOKEN"])
repo = "<user>/teencode-normalizer-v3"
api.create_repo(repo, repo_type="model", exist_ok=True)   # add private=True to start private
api.upload_folder(folder_path=".", repo_id=repo, repo_type="model",
                  ignore_patterns=["upload.sh", "UPLOAD.md"], commit_message="Upload teencode-normalizer v3")

Option C: web UI

  1. https://huggingface.co/new → name teencode-normalizer-v3, license MIT, Public or Private → Create.
  2. Files and versions → Add file → Upload files. Drag everything in this folder keeping the onnx/ folder (drag the folder itself). Files over 10 MB are stored via LFS automatically.
  3. Commit. The model card renders from README.md.

Check: the model page should show tags, the MIT license and the CER metrics.