Emotion API RRS feed

  • Question

  • Hello,

    I have developed a project using emotions recognition on pictures. I would like to replace the keys through my new subscription but do not find on the website or the platform.

    Could you please help me ?

    Thank you very much.

    Best regards,


    Wednesday, October 9, 2019 5:55 PM

All replies

  • Hi Antoinebou,

    Thank you for reaching out. Giving Python as an example, you just need to change the "none" of "Subscription_key = none" with the subscription ID you want to use.

    import requests import json # set to your own subscription key value subscription_key = None assert subscription_key # replace <My Endpoint String> with the string from your endpoint URL face_api_url = 'https://<My Endpoint String>.com/face/v1.0/detect' image_url = 'https://upload.wikimedia.org/wikipedia/commons/3/37/Dagestani_man_and_woman.jpg' headers = {'Ocp-Apim-Subscription-Key': subscription_key} params = { 'returnFaceId': 'true', 'returnFaceLandmarks': 'false', 'returnFaceAttributes': 'age,gender,headPose,smile,facialHair,glasses,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise', } response = requests.post(face_api_url, params=params, headers=headers, json={"url": image_url}) print(json.dumps(response.json()))

    For more details, please refer to: https://docs.microsoft.com/en-us/azure/cognitive-services/face/quickstarts/python 



    Wednesday, October 9, 2019 7:26 PM