Hey @vicente-m47 ,
Could you please provide the whole code you executed?
If you want to deploy a model from Hugging Face – The AI community building the future. 1 you can use the “deploy” button on each of the model pages.

image1456×382 55.7 KB

This will generate a code snippet for you

image1455×1159 178 KB

From reading the code you attached you are trying to send an input for question-answering to a model (dccuchile/bert-base-spanish-wwm-uncased), which is not fine-tuned for question-answering, also you are sending an English input to a Spanish model.
A good starting point for new Hugging Facer is our course at Transformer models - Hugging Face Course.
You can find more information about deploying to sagemaker in the documentation here Deploy models to Amazon SageMaker 1