Fails to run in SageMaker
I tried running the given code sample -
from sagemaker.huggingface import HuggingFaceModel
import sagemaker
role = sagemaker.get_execution_role()
Hub Model configuration. https://huggingface.co/models
hub = {
'HF_MODEL_ID':'vasista22/whisper-telugu-base',
'HF_TASK':'automatic-speech-recognition'
}
create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
transformers_version='4.17.0',
pytorch_version='1.10.2',
py_version='py38',
env=hub,
role=role,
)
deploy model to SageMaker Inference
predictor = huggingface_model.deploy(
initial_instance_count=1, # number of instances
instance_type='ml.m5.xlarge' # ec2 instance type
)
predictor.predict({
'inputs': "Telugu.flac"
})
and it fails with
ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message "{
"code": 400,
"type": "InternalServerException",
"message": "\u0027whisper\u0027"
}