Skip to content

Commit

Permalink
added support for huggingface runtime speech models (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
saeid93 authored Oct 11, 2022
1 parent c6cd72a commit 6eac14a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtimes/huggingface/mlserver_huggingface/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ async def predict(self, payload: InferenceRequest) -> InferenceResponse:
# TODO: convert and validate?
kwargs = self.decode_request(payload, default_codec=MultiStringRequestCodec)

args = []
if "args" in kwargs:
args = kwargs["args"]
del kwargs["args"]
args = kwargs.pop("args", [])
X = kwargs.pop("array_inputs", None)
if X is not None:
args = [list(X)] + args
prediction = self._model(*args, **kwargs)

# TODO: Convert hf output to v2 protocol, for now we use to_json
Expand Down

0 comments on commit 6eac14a

Please sign in to comment.