Hello,
I was trying to use the inference api to extract features of sentences. However I am getting an error.
this is my code:
API_URL = “https://api-inference.huggingface.co/models/sentence-transformers/multi-qa-mpnet-base-dot-v1”
headers = {“Authorization”: f"Bearer "}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)

return response.json()

data = query({“inputs”: “writing, painting, or printing signs or show cards used for display or other purposes.”})
print (data)
The error that I get is as follows:
{‘error’: ['SentenceSimilarityInputsCheck expected dict not list: __root__ in parameters']}
Could you please help me out here?
Thanks in advance