Consuming the Face API from Python code

When your program includes security credentials such as API keys, it is often a good practice to define those keys as environmental variables and then call them in your program. So, go ahead and create an environment variable to store one of the API keys of the Face API.

To add an environment variable to your computer, you can follow this article at https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html.

In my case, I have named the environment variable face_api_key. You can put any image that contains faces in it. For this example, I will be using this image:

Create a new Jupyter ...

Get Hands-On Python Deep Learning for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.