Generative AI with Azure OpenAI Service (DALL-E Overview)

Introduction

Hey, there! In this article, we'll learn about Generative AI and how to use the Azure OpenAI service for image generation with DALL-E.

Generative Artificial Intelligence is a type of AI that creates new and original content based on what it has learned from previous data. It can be used to generate text, images, music, and more.

Azure OpenAI

Azure OpenAI is part of Azure Cognitive Services, which uses generative AI models. In this sense, these are the workloads that we can consider:

  • Generating Natural Language.
  • Generating Code.
  • Generating Images.

For our Azure OpenAI overview, we'll exemplify this scenario: Generate images with DALL-E 2.

Exploring Azure OpenAI


Create Azure OpenAI service

As a first point, within Azure, we'll have to create a new OpenAI resource like any other.

Here, in addition to the subscription and resource group, we must specify the name, region, and pricing tier for the new resource.

Create Azure OpenAI resource

With the service created, we can see the resource overview, keys & endpoints, and the Go to Azure OpenAI Studio option to go to the low-code dashboard.

Azure OpenAI resource

Azure OpenAI Studio

And here we have it: The Azure OpenAI portal (https://oai.azure.com/).

To work with DALL-E in the portal, we must go to the DALL·E 2 playground section and start generating images with the prompts that we specify.

For each image generated, these will be our available options.

  • Copy prompt.
  • Generate a new image with the same prompt.
  • Download the image.
  • Show code (to call the model).
  • Delete image.

To generate an example of consuming DALL-E in Python, this would be an example of how we can generate the code (from the Show Code option in a generated image).

Thanks for reading!

If you have any questions or ideas, it will be a pleasure to communicate with you and exchange knowledge with each other.

If you want to learn more about Azure OpenAI, this Microsoft Learn module is a good option: Introduction to Azure OpenAI Service.

See you on Twitter / LinkedIn.


Similar Articles