We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c030718 commit 2ecb218Copy full SHA for 2ecb218
libs/infinity_emb/infinity_emb/transformer/utils_optimum.py
@@ -5,7 +5,7 @@
5
from typing import Optional, Union
6
7
import numpy as np
8
-from huggingface_hub import HfApi, HfFolder # type: ignore
+from huggingface_hub import HfApi, get_token # type: ignore
9
from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE # type: ignore
10
11
from infinity_emb._optional_imports import CHECK_ONNXRUNTIME, CHECK_OPTIMUM_AMD
@@ -209,7 +209,7 @@ def _list_all_repo_files(
209
):
210
if not Path(model_name_or_path).exists():
211
if isinstance(use_auth_token, bool):
212
- token = HfFolder().get_token()
+ token = get_token()
213
else:
214
token = use_auth_token
215
return list(
0 commit comments