Skip to content

Commit

Permalink
fix hf-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Feb 5, 2025
1 parent 8d78dca commit 181b6a7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/huggingface_hub/inference/_providers/hf_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
from typing import Any, Dict, List, Optional, Tuple, Union

from huggingface_hub.constants import ENDPOINT
from huggingface_hub.inference._common import (
RequestParameters,
TaskProviderHelper,
_b64_encode,
_open_as_binary,
)
from huggingface_hub.inference._common import RequestParameters, TaskProviderHelper, _b64_encode, _open_as_binary
from huggingface_hub.utils import build_hf_headers, get_session, hf_raise_for_status


Expand Down Expand Up @@ -81,9 +76,7 @@ def prepare_request(
extra_payload = {}
mapped_model = self.map_model(model)
url = self.build_url(mapped_model)
data, json = self._prepare_payload(
inputs, parameters=parameters, model=mapped_model, extra_payload=extra_payload
)
data, json = self._prepare_payload(inputs, parameters=parameters, model=model, extra_payload=extra_payload)
headers = self.prepare_headers(headers=headers, api_key=api_key)

return RequestParameters(
Expand Down

0 comments on commit 181b6a7

Please sign in to comment.