Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/infinity_emb/infinity_emb/transformer/utils_optimum.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Optional, Union

import numpy as np
from huggingface_hub import HfApi, HfFolder # type: ignore
from huggingface_hub import HfApi, get_token # type: ignore
from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE # type: ignore

from infinity_emb._optional_imports import CHECK_ONNXRUNTIME, CHECK_OPTIMUM_AMD
Expand Down Expand Up @@ -209,7 +209,7 @@ def _list_all_repo_files(
):
if not Path(model_name_or_path).exists():
if isinstance(use_auth_token, bool):
token = HfFolder().get_token()
token = get_token()
else:
token = use_auth_token
return list(
Expand Down