ylvi-bux
ylvi-bux

Reputation: 37

Duckling API {'message': 'An invalid response was received from the upstream server'}

I use duckling for extracting written numbers from the text and converting them to digits. After passing the sentence(string) I'm obtaining the json response message : An invalid response was received from the upstream serve .

url = "https://duckling..../parse"

payload = f'locale=de_DE&text={input_transcript}&dims=number'
headers = {
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
    }

try:
        response = requests.post(
            url,
            data=payload,
            headers=headers,
        )
        if response.status_code == 200:
           json_response = response.json()
   


Can anyone help me to solve this issue?

Upvotes: 0

Views: 749

Answers (0)

Related Questions