Skip to content

Commit

Permalink
Metadata update (huggingface#23259)
Browse files Browse the repository at this point in the history
* Metadata update

* Make fixup
  • Loading branch information
LysandreJik authored and novice03 committed Jun 23, 2023
1 parent 9e67962 commit fc4d3c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transformers/tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import tempfile
from typing import Any, Dict, List, Optional, Union

from huggingface_hub import CommitOperationAdd, HfFolder, create_commit, create_repo, hf_hub_download
from huggingface_hub import CommitOperationAdd, HfFolder, create_commit, create_repo, hf_hub_download, metadata_update
from huggingface_hub.utils import RepositoryNotFoundError, get_session

from ..dynamic_module_utils import custom_object_save, get_class_from_dynamic_module, get_imports
Expand Down Expand Up @@ -285,6 +285,7 @@ def push_to_hub(
repo_url = create_repo(
repo_id=repo_id, token=token, private=private, exist_ok=True, repo_type="space", space_sdk="gradio"
)
metadata_update(repo_id, {"tags": ["tool"]}, repo_type="space")
repo_id = repo_url.repo_id

with tempfile.TemporaryDirectory() as work_dir:
Expand Down

0 comments on commit fc4d3c9

Please sign in to comment.