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
3 changes: 2 additions & 1 deletion src/huggingface_inference_toolkit/webservice_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ async def predict(request):
"automatic-speech-recognition",
"audio-classification",
}:
# Be more strict on base64 decoding, the provided string should valid base64 encoded data
deserialized_body["inputs"] = base64.b64decode(
deserialized_body["inputs"]
deserialized_body["inputs"], validate=True
)

# check for query parameter and add them to the body
Expand Down