Issues with deploying clip cap

#1
by tararelan - opened

I'm trying to deploy the model on Sagemaker using the code provided. However, when I try the following code, I get an error

import boto3
import json

Create a SageMaker runtime client

client = boto3.client('sagemaker-runtime')

Specify the SageMaker endpoint name

endpoint_name = "huggingface-pytorch-inference"

Provide the payload you want to use for prediction

data = {
"inputs": {
"img_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/The_Kelpies_1-1_Stitch.jpg/1200px-The_Kelpies_1-1_Stitch.jpg",
}
}
payload = json.dumps(data)

try:
response = client.invoke_endpoint(
EndpointName=endpoint_name,
ContentType="application/json",
Accept="application/json",
Body=payload
)
print(response['Body'].read().decode())
except Exception as e:
print(f"Error invoking endpoint: {e}")

Error invoking endpoint: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message "{
"code": 400,
"type": "InternalServerException",
"message": "/.sagemaker/mms/models/michelecafagna26__clipcap-base-captioning-ft-hl-actions does not appear to have a file named config.json. Checkout \u0027https://huggingface.co//.sagemaker/mms/models/michelecafagna26__clipcap-base-captioning-ft-hl-actions/None\u0027 for available files."
}

I am also unsure what the input to the model is supposed to be, so I'd appreciate some help there as well.

Sign up or log in to comment