Technical requirements
One of the following Python IDE and software tools needs to be installed before running the notebook in this chapter:
- Anaconda Navigator: Download and install the open source Anaconda Navigator from the following URL:
https://docs.anaconda.com/navigator/install/#system-requirements
- Jupyter Notebook: Download and install Jupyter Notebook:
- We can also use open source, online Python editors such as Google Colab (https://colab.research.google.com/) or Replit (https://replit.com/)
The Python source code and the entire notebook created in this chapter are available in this book’s GitHub repository:
https://github.com/PacktPublishing/Data-Labeling-in-Machine-Learning-with-Python
You also need to create an Azure account and add an OpenAI resource for working with generative AI. To sign up for a free Azure subscription, visit https://azure.microsoft.com/free. To request access to the Azure OpenAI service, visit https://aka.ms/oaiapply.
Once you have provisioned the Azure OpenAI service, deploy the LLM model – either GPT-3.5-Turbo or GPT 4.0 – from Azure OpenAI Studio. Then copy the keys for OpenAI from OpenAI Studio and set up the following environment variables:
os.environ['AZURE_OPENAI_KEY'] = 'your_api_key' os.environ['AZURE_OPENAI_ENDPOINT") ='your_azure_openai_endpoint'
Your endpoint should look like this: https://YOUR_RESOURCE_NAME.openai.azure.com/.