# Client\_error\_from\_model

**URL:** <https://discuss.huggingface.co/t/client-error-from-model/33802>\
**Category:** Amazon SageMaker\
**Created:** [March 14, 2023, 6:17pm UTC](https://discuss.huggingface.co/t/client-error-from-model/33802 "2023-03-14T18:17:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ujjirox](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@ujjirox](https://discuss.huggingface.co/u/ujjirox)\
**Post date:** [March 14, 2023, 6:17pm UTC](https://discuss.huggingface.co/t/client-error-from-model/33802/1 "2023-03-14T18:17:57Z")

</div>

I tried to deploy a Zero-Shot Model (bart-large-mnli) and used the exact code recommended in the model page for AWS Deployments.

```auto
from sagemaker.huggingface import HuggingFaceModel
import sagemaker

role = sagemaker.get_execution_role()
# Hub Model configuration. https://huggingface.co/models
hub = {
	'HF_MODEL_ID':'facebook/bart-large-mnli',
	'HF_TASK':'zero-shot-classification'
}

# 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': "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"
})

```

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/7/73997bf2fe0cbf7f0b068074d1266826e9ff83a3.png)

It returned an error. Was wondering if I could get some tips on this. Thanks.

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](https://discuss.huggingface.co/u/philschmid)\
**Post date:** [March 15, 2023, 8:03am UTC](https://discuss.huggingface.co/t/client-error-from-model/33802/2 "2023-03-15T08:03:37Z")

</div>

Hello @ujjirox,

Thank you for opening this thread! The inputs are not correct on the UI. You can find the right format here: [Supported Transformers &amp; Diffusers Tasks](https://huggingface.co/docs/inference-endpoints/supported_tasks#zero-shot-classification)

```json
{
  "inputs": "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!",
  "parameters": {
    "candidate_labels": ["refund", "legal", "faq"]
  }
}

```
