For info, to create tag:
from huggingface_hub import HfApi
api = HfApi()
repo_id = "StanfordAIMI/chextemporal"
tag_name = "v1.0"
refs = api.list_repo_refs(repo_id=repo_id, repo_type="dataset")
main_branch = next((ref for ref in refs.branches if ref.name == "main"), None)
if main_branch:
latest_commit = main_branch.target_commit
api.create_tag(
repo_id=repo_id,
tag=tag_name,
revision=latest_commit,
repo_type="dataset"
)
print(f"Tag {tag_name} created for commit {latest_commit}")
else:
print("Main branch not found in the dataset repository.")