[Bugfix] Fix modelscope usage (#52431)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -48,15 +48,14 @@ def modelscope_list_repo_files(
|
||||
|
||||
api = HubApi()
|
||||
api.login(token)
|
||||
|
||||
# same as huggingface_hub.list_repo_files
|
||||
files = [
|
||||
return [
|
||||
file["Path"]
|
||||
for file in api.get_model_files(
|
||||
model_id=repo_id, revision=revision, recursive=True
|
||||
)
|
||||
if file["Type"] == "blob"
|
||||
]
|
||||
return files
|
||||
|
||||
|
||||
def _maybe_json_dict(path: str | PathLike) -> dict[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user