Unverified Commit 4f05bbf1 authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Metadata update (#23259)

* Metadata update

* Make fixup
parent 996f127a
...@@ -23,7 +23,7 @@ import os ...@@ -23,7 +23,7 @@ import os
import tempfile import tempfile
from typing import Any, Dict, List, Optional, Union 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 huggingface_hub.utils import RepositoryNotFoundError, get_session
from ..dynamic_module_utils import custom_object_save, get_class_from_dynamic_module, get_imports from ..dynamic_module_utils import custom_object_save, get_class_from_dynamic_module, get_imports
...@@ -285,6 +285,7 @@ class Tool: ...@@ -285,6 +285,7 @@ class Tool:
repo_url = create_repo( repo_url = create_repo(
repo_id=repo_id, token=token, private=private, exist_ok=True, repo_type="space", space_sdk="gradio" 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 repo_id = repo_url.repo_id
with tempfile.TemporaryDirectory() as work_dir: with tempfile.TemporaryDirectory() as work_dir:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment