We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d4f7f1 commit 833b5a2Copy full SHA for 833b5a2
src/huggingface_inference_toolkit/webservice_starlette.py
@@ -101,8 +101,9 @@ async def predict(request):
101
"automatic-speech-recognition",
102
"audio-classification",
103
}:
104
+ # Be more strict on base64 decoding, the provided string should valid base64 encoded data
105
deserialized_body["inputs"] = base64.b64decode(
- deserialized_body["inputs"]
106
+ deserialized_body["inputs"], validate=True
107
)
108
109
# check for query parameter and add them to the body
0 commit comments