Ich versuche Azure Textanalyse-Tool zu verwenden Themen zu extrahieren, aber die 400 Bad Anfrage Fehler bekommen: Mein Code unten:Azure Cognitive Textanalyse-Tool liefert 400 Bad Anfrage Python
account_key = '546e6162da424e6f991d03b7f6acxxx'
headers = {
'Ocp-Apim-Subscription-Key': account_key,
'Content-Type': 'application/json',
'Accept': 'application/json'}
import requests
tufani={
"documents": [
{
"language": "en",
"id": "1",
"text": "First document"
},
{
"language": "en",
"id": "100",
"text": "Final document"
}
]
}
print('Starting topic detection.')
uri = base_url + 'text/analytics/v2.0/topics'
r=requests.post('https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/topics',data=str(tufani),headers =headers)
print(r.status_code, r.reason)
(400, ‚Bad Request ')
Was mache ich da falsch?
Danke!