File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22import re
33import typing
44from typing import Literal , Optional , Tuple
5- from urllib .parse import urljoin
65
76
87# Possible values for env variables
@@ -68,7 +67,7 @@ def _as_int(value: Optional[str]) -> Optional[int]:
6867 _HF_DEFAULT_STAGING_ENDPOINT if _staging_mode else _HF_DEFAULT_ENDPOINT
6968)
7069
71- HUGGINGFACE_CO_URL_TEMPLATE = urljoin ( ENDPOINT , "/{repo_id}/resolve/{revision}/{filename}" )
70+ HUGGINGFACE_CO_URL_TEMPLATE = ENDPOINT + "/{repo_id}/resolve/{revision}/{filename}"
7271HUGGINGFACE_HEADER_X_REPO_COMMIT = "X-Repo-Commit"
7372HUGGINGFACE_HEADER_X_LINKED_ETAG = "X-Linked-Etag"
7473HUGGINGFACE_HEADER_X_LINKED_SIZE = "X-Linked-Size"
@@ -79,7 +78,7 @@ def _as_int(value: Optional[str]) -> Optional[int]:
7978INFERENCE_ENDPOINTS_ENDPOINT = "https://api.endpoints.huggingface.cloud/v2"
8079
8180# Proxy for third-party providers
82- INFERENCE_PROXY_TEMPLATE = urljoin ( ENDPOINT , "/api/inference-proxy/{provider}" )
81+ INFERENCE_PROXY_TEMPLATE = ENDPOINT + "/api/inference-proxy/{provider}"
8382
8483REPO_ID_SEPARATOR = "--"
8584# ^ this substring is not allowed in repo_ids on hf.co
You can’t perform that action at this time.
0 commit comments