Jump to content

Unlock Limitless Creativity with DALL·E 2: Elevate Your PowerApps with Imaginative Images

Featured Replies

Posted

This article helps how to use Dall-e 2 API to create images from textual description.

 

Start with Dall-e 2 account

DALL·E 2

 

Jumpstart Your Creativity with Dall-E 2: Get 50 Free Credits to Create, Tweak, and Generate Image Variants!

 


  1. Create a free account: Sign up for an account on the OpenAI website to access DALL-E 2. Upon signing up, you will receive 50 credits initially, with an additional set of 15 credits added every month. Note that free credits cannot be carried forward.
     
     

  2. Explore the web application: DALL-E 2 is available as a web application, which you can directly access from your internet browser. Once logged in, you can start using the AI image generation function through the web application's interface.
     

 

Create a PowerApp

 

  • TextInput to type the prompt
  • Button to trigger the Power automate
    Set OnSelect property:
    Set(imageurl, OpenAIDalle.Run(imagePromptTextInput.Text))
    where OpenAIDalle is the name of the PowerAutomate workflow
  • Media Type Image to display the image returned from Dall-e Power automate

 

 

 

mediumvv2px400.png.c9c1c55871534edf009a55a326949e55.png

 

 

 

Create a PowerAutomate

 


  • Here are the steps to create a Power Flow:
     
    1. Go to flow.microsoft.com and click on "Flows".
    2. Visit Microsoft Power Automate
    3. Click "New Flow" and name it "OpenAIDalle".
    4. Start with PowerApps trigger to get the prompt.
      mediumvv2px400.png.17e176d0729f819c7bedc6f0da76b4ec.png

       
       
    5. HTTP-Dall-e (as shown below)
      mediumvv2px400.png.1641e0612617e0cf83347d578b7c0897.png
       
      Get OpenAI api-key from OpenAI API
       
      replace openai_Api_key with above key
      Authorization: Bearer openai_Api_key
    6. parse the response json for generated image URL from a prompt
    7. Send the image URL back to powerappmediumvv2px400.png.c9292c700c2eefb620ffa1c3f44ed1d6.pngPowerApps
      Set the media image URL in PowerApps as returned response from PowerApps
       
      mediumvv2px400.png.60a9eea42aebb30b9e1d1834392a70fd.png
      Output in PowerApps
      mediumvv2px400.png.53e309030efbe8a7d88a39a45efe61a2.pngmediumvv2px400.png.601afb6619e0cdd0f4e8ea348f67f8cf.pngmediumvv2px400.png.bc2bcf667132c43c643249b346f3fc94.png
       
       
       
       
      References:
       
      OpenAI API
      How to use AI image prompts to generate art using DALL‑E | Learn at Microsoft Create
       
      More advance capabilities of DALL-e 2 and PowerApps are coming soon!!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...