Unverified Commit 2d87d7d1 authored by Shanshan Shen's avatar Shanshan Shen Committed by GitHub
Browse files

[Bugfix] Modify modelscope api usage in transformer_utils (#13807)

parent aab39277
......@@ -29,9 +29,8 @@ def modelscope_list_repo_files(
) -> List[str]:
"""List files in a modelscope repo."""
from modelscope.hub.api import HubApi
from modelscope.utils.hf_util import _try_login
_try_login(token)
api = HubApi()
api.login(token)
# same as huggingface_hub.list_repo_files
files = [
file['Path'] for file in api.get_model_files(
......
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