Azure Cognitive Services Modules For Python

Azure Cognitive Services Modules For Python

In this Azure tutorial, we will discuss Azure Cognitive Services Modules For Python, Along with this, we will also discuss a few other topics like below

  • Azure Python SDK
  • Setup the Python-Dev environment For Azure

Azure Cognitive Services Modules For Python

Well, Let’s discuss an interesting topic i.e What is the Azure Cognitive Services Modules for Python. If you want to use AI features like language analysis, search, face recognition in your Python apps, Microsoft provides different Azure Cognitive Services modules for Python.

Computer Vision Module

Computer Vision Module helps you to find out the details contained in an image. Install the Azure Cognitive Services computer vision Modules for Python using the below command.

pip install azure-cognitiveservices-vision-computervision

Content Moderator Module

The Content Moderator Module helps you to deal with the text, video and images, etc. Install the Content Moderator Module using the below command.

pip install azure-cognitiveservices-vision-contentmoderator

Custom Vision Service Module

You can use the below command to install Custom Vision Service Module.

pip install azure-cognitiveservices-vision-customvision

Face API Module

The Face API Module helps you analyze, detect, identify faces in an image or Photo. You can use the below command to install the Azure Face API module

pip install cognitive-face

Web search Module

Web search module helps you to get the web documents indexed by the Bing Web Search API. You can use the below command to install the Web search Module.

pip install azure-cognitiveservices-search-websearch

Entity search Module

Entity search Module helps you to search for different entities like the place, person, etc easily. You can use the below command to install the Entity search Module.

pip install azure-cognitiveservices-search-entitysearch

Image search Module

Image search Module helps you to get the image, image URL, and image metadata quickly. Use the below command to install the Image search Module.

pip install azure-cognitiveservices-search-imagesearch

Custom search Module

You can use the Custom search Module to customized your search result based on your requirement. You can use the below command to install the Custom search Module based on your requirement.

pip install azure-cognitiveservices-search-customsearch

News Search Module

This module helps to search the News articles, related news, etc. using the News Search Module. Use the below command to install the News Search Module.

pip install azure-cognitiveservices-search-newssearch

Video Search Module

This is an excellent module that helps you provide a quick result when searching for the Videos. You can use the below command to install the Video Search Module.

pip install azure-cognitiveservices-search-videosearch

Text Analytics Module

Text Analytics module is another excellent module from Microsoft. that actually helps you to perform the Key phrase extraction, Sentiment analysis, etc

pip install azure-cognitiveservices-language-textanalytics

Spell Check Module

This is also an excellent module from the Microsoft that actually helps you with the grammar and spell checking. You can use the below command to install the Spell Check Module.

pip install azure-cognitiveservices-language-spellcheck

So these are the Azure Cognitive Services Modules For Python available that you can use in your application for different purposes.

Azure Python SDK

The Azure libraries for Python are open-source and can be used to manage, provision Azure resources from the Python application code.

The Azure libraries are all about how you are communicating with the Azure services from the Python code. You may run the Python code locally or in the cloud. The libraries support Python 2.7 and 3.5.3 version and above. The Azure SDK for Python composed up more than 180 individual Python libraries.

You can use the pip install <library name> to install the library package that you want to install.pip install retrieves the latest version of a library in the Python environment.

The Azure libraries for Python build on top of the Azure REST API and you can use the Rest API from the Python code.

Setup the Python Dev environment For Azure

The first step is to configure your Python-Dev environment for Azure. As part of the configuration of the Python-Dev environment, we need to install a few main components like below

  • Install the main components like Azure account, Python, and the Azure CLI
  • Configure the Authentication to use the Azure Libraries to provision and manage the Azure Resources.

The main required components are as below

  • You must have an Azure Account or Azure Subscription. If you don’t have an Azure Account till now, Create an Azure Free Account now.
  • You need the Python latest runtime version 3.x. The recommended Python runtime version is 3.x.
  • You need the Azure command-line interface or Azure CLI that helps you with the environment to run the commands needed that helps to manage the Azure Resources.

The recommended components are as below

  • Visual Studio Code
  • Python extension for Visual Studio Code
  • Azure Extension for Visual Studio Code
  • Git command-line tool for the Source control

You can verify the components by following the below steps

  • Open the command prompt in your machine
  • Then run the command python –version to check the Python version installed in your machine
  • Now, run the command az –version to check the Azure CLI version.
  • Then to check the Visual Studio Code Part, you can run the code . to open the VS Code from the current folder. To verify the Extensions if you have installed properly. Select the View —> Extensions command to open the extensions view, Now just check if you can able to see the Python and Azure Account in the list. Check out the Azure extensions and Docker in the list.

Sign in to Azure from the CLI using the az login command. You need to configure the authentication using the service principal and environment variable.

Python virtual environments

It is always recommended to use the Python virtual environments for each project. You can follow the below steps to create and activate the Python virtual environments.

  • Open the command prompt in your machine
  • Create a folder for your project that you want to create or use.
  • Use the below cmdlet to create the Python virtual environments. The below command runs the Python venv module and creates a virtual environment
py -3 -m venv .venv

Once it got created, use the below command to activate the Python virtual environment

.venv\scripts\activate

Once you activate that environment, you can run the pip install command that installs a library into that environment

You may also like following the below articles

Wrapping Up

Well, in this article, we have discussed Azure Cognitive Services Modules For Python, Azure Python SDK and we also discussed Setup the Python-Dev environment For Azure. Hope you have enjoyed this article !!!!