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.
audio-classification
1 parent be06a8f commit 2bfb62fCopy full SHA for 2bfb62f
src/huggingface_inference_toolkit/webservice_starlette.py
@@ -96,9 +96,10 @@ async def predict(request):
96
f"Body needs to provide a inputs key, received: {orjson.dumps(deserialized_body)}"
97
)
98
99
- # Decode inputs conditioned on the task.
100
- if "parameters" in deserialized_body and HF_TASK in {
101
- "automatic-speech-recognition"
+ # Decode base64 audio inputs before running inference
+ if "inputs" in deserialized_body and HF_TASK in {
+ "automatic-speech-recognition",
102
+ "audio-classification",
103
}:
104
deserialized_body["inputs"] = base64.b64decode(
105
deserialized_body["inputs"]
0 commit comments