Skip to content

Commit 2ecb218

Browse files
committed
add changes required for huggingface hub >1
1 parent c030718 commit 2ecb218

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/infinity_emb/infinity_emb/transformer/utils_optimum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Optional, Union
66

77
import numpy as np
8-
from huggingface_hub import HfApi, HfFolder # type: ignore
8+
from huggingface_hub import HfApi, get_token # type: ignore
99
from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE # type: ignore
1010

1111
from infinity_emb._optional_imports import CHECK_ONNXRUNTIME, CHECK_OPTIMUM_AMD
@@ -209,7 +209,7 @@ def _list_all_repo_files(
209209
):
210210
if not Path(model_name_or_path).exists():
211211
if isinstance(use_auth_token, bool):
212-
token = HfFolder().get_token()
212+
token = get_token()
213213
else:
214214
token = use_auth_token
215215
return list(

0 commit comments

Comments
 (0)