以下对 clarifai api 的请求有什么问题-
import requests
image_url='https://samples.clarifai.com/food.jpg'
api='Key cb03ceba3c8842aeadd55dcb2f0be152'
headers = {
'Authorization': api,
'Content-Type': 'application/json',
}
data = '{"inputs": [{"data": {"image": {"url": image_url}}}]}'
url='https://api.clarifai.com/v2/models/bd367be194cf45149e75f01d59f77ba7/outputs'
response = requests.post(url=url, headers=headers, data=data)
print(response.status_code, response.json())
我一直遇到这个错误-
400 {'status': {'code': 11102, 'description': 'Invalid request', 'details': 'Malformed or invalid request'}}