Skip to content

Commit

Permalink
Add tag_model function to huggingface tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ejohb committed Aug 17, 2024
1 parent c79a139 commit 3de4aba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions fmtr/tools/hfh_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,11 @@ def main():
run(args.config)


if __name__ == '__main__':
run('cache.json')
def tag_model(repo_id: str, tag: str):
"""
Tag a model repository
"""
api = huggingface_hub.HfApi()
return api.create_tag(repo_id, tag=tag, repo_type='model')
2 changes: 1 addition & 1 deletion fmtr/tools/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.17
0.8.18

0 comments on commit 3de4aba

Please sign in to comment.