PL-100 Microsoft Power Platform App Maker – Describe AI Builder models Part 2
September 7, 2023

3. 69. Use a model from within Power Automate

In this video, we’re going to look at how we can use a prebuilt model in Power Ultimate. So here I am in the home section, and I could search for AI Builder and that will bring back everything which has got AI Builder included in it. And you can see the AI Builder here. It’s a purple or dark purple type of background.

So you have some ideas here. For instance, click a button to read and save information from documents, extract entities from received emails, root emails according to category, over text, analyze text articles, classify text messages, and add the results into Excel. So what we’re going to do is we’re going to have a look at another way of looking at all of these. And I’m going to create a new floor. And it’s going to be an instant floor. I’m just going to at least skip this section because all I need to do is get a manually triggered floor new step and click on AI Builder. Alternatively, you could search for AI Builder and then click onto it and then click on See more.

So here are the things you can do in Power Automate. Analyze a positive or negative sentiment in text. Classify text using a standard or custom model. Detect and count on objects in an image so that’s the object detection model detect the language being used in a text. Extract entities using your own model or the standard model. Extract key phrases and predict what will happen. Process information using forms, identity documents, invoices and receipts. Read business card information and recognize text in an image. So these are all the things that you can do.

So what I’m going to do is go back into my Twitter language count. So I’m going to just check it and I’m going to save it. So I’m going to duplicate it. So this one’s going to be Twitter sentiment. So let’s see whether it’s positive, mixed, negative, or good. So I’m going to turn this on and edit it. So this is what we’ve previously done. We have searched, tweets, and then applied to each something and then sent a mobile notification.

So what I’m going to do, first of all, I’m going to delete that. I’m going to be putting in an email notification. And the only variable I want is the language variable, the name of the languages, which is this one. And I’m going to change this from language used to sentiment analysis. So we’re manually triggering a floor. That floor is going to ask for the search term. It’s going to then search the tweets.

And then we’re going to loop through each one of these. We’re going to do an appendixtring variable later, but we’re going to have a condition first. And the condition is going to be based on the AI Builder. So let’s delete that to just make this a bit simpler. So for each tweet, we’re going to ask the AI Buddha to look at the sentiment. So analyze positive or negative sentiment in text.

Now we’re going to do this to English. So first of all I want to only do this for the tweets which happen to be in English. So let’s add a condition first. So we add a condition, a control condition. So if the language of the tweet is en, we worked out earlier it was en for English then let’s go into the AI boda. Analyze positive or negative sentiment in the text. So choose English and have a look at the tweet text. So the text content of the tweet. And then what I want you to do is in a variable I want you to append to a string variable. So I want you to append and here you can see some of the outcomes probability the overall text is negative, neutral or positive and the same for each individual sentence. If you do that there’ll be another apply to each for each sentence.

Then we have things like document scores, sentiment scores and that sort of thing. So what I’m going to do is use this the result. So the result of the sentiment is going to be appended to the string variable and if it’s not English I’m just going to leave it. I’m just going to be looking at English tweets and then I want to add an action right at the end. So I’m currently inside that I need to click on new step right at the bottom. And this is going to be an email and it’s going to be sent to me. So here’s the result. And what I want in the text is the sentiment analysis.

So it’s been going through all of the English tweets, analyzing the positive or negative sentiment in the text and then appending it to the string variable. You notice I didn’t have to do any configuration to be able to use this pre built model. I just had to say use it. So now that’s done, let’s save and test. So I’m going to look for Microsoft. We’re on the floor. This will take quite a few seconds because it’s got to submit to the AI builder, each individual tweet. But it’s done that in 11 seconds.

And now I’ll go to my email and here are the results. So this is in JSON J-S-O-N. But you can read that this particular tweet, for instance, positive zero, negative zero is entirely neutral. And if I just scroll down we have this one which is 95% positive 4% negative 1% neutral. Similar for this, this 119 percent positive, 78% neutral 3% negative.

So you can process this JSON or we can edit this and instead of going for the result you could go for anything else that the analyzed positive or negative sentiment comes up with. So in this video we’ve had a look at the various types of things that we can use Power automate for and we had to look at a specific example how to analyze sentiment in text and you can see that because we were using a pre built model, we didn’t actually have to do any configuration. It was just like using any of these other actions. And that is how we can use the AI builder.

4. 69. Use AI Builder components from within canvas Power Apps

In this video we’re going to see how we can use our AI Builder models inside a canvas app. So I’m going to start with a blank canvas and it’s going to be just a standard blank app using a tablet layout. So first of all, we need to have an image. And we’ve got an image. It’s attached to this video and it’s an invoice that we’ve used in the past. Now it is an image. There’s no text behind it. What I’m going to do now is go to insert AI Builder and you can see that there are five different models here.

We’re going to use the text recognizer and the business card reader in this particular video. In the next video, we’ll look at some of these other models which aren’t on this list. So I’m going to insert the text recognizer and this inserts it as an actual object. So the way that it’s used is I click on a new image and I can open up an image. So there is image and it is being recognized. And you can see that there are lines all around it where text has been recognized. So I’m now going to add a label. So let’s move the label over here and I’m going to change the background color so I can actually see where it is. Now the text is going to be based on the text recognizer. So text recognizer one.

So text recognizer one dot selected text. So whatever text is recognized, which I’m selecting, it will highlight. So if I play this app now and I click on something, you can see that it changes according to what has been selected. Now similarly, I can insert another label. This is going to be a lot deeper. And again, let’s have a background color. Now this is going to be a bit different. So again, we’re going to start with Text Recognizer.

Always make sure using the correct capitalizations dot. Now you can see we’ve got a fair number of things here and the other one I’m going to look at this time is Results. So I could put Text recognizer one results text. However, there’s a problem with that. Text recognizer one. Results is a table, so it’s lots of different rows. So if I’m getting the text, then I need some way of combining it. And the way I can do that is by using the concat function. So as opposed to concatenate which joins individual text together, the concat function joins together a table. So what am I going to join together? I’m going to join the text and a space. And here you can see all of the text that it has got.

So now I can play this, I can upload more things, I can click on different items. It doesn’t affect the totality of the text which is here. So that is the text recognizer. So I’m going to now put in a new screen. I’m going to use the business card reader. And again, there is a business card attached to this video. So again, let’s just play and I’ll upload that business card. So needless to say, this is a fake business card with fake details. The city is called New York, for example. And what I’m going to do again is put in a label which has a link in the text to this business card reader one.

So business card reader one and look at everything I can do. So things relating to address city. So you can see instantly we’ve got New York there it has correctly identified what the city is, the country blank. The country is not actually mentioned, so that’s quite correct. The postal cord, also known as the zip code. So that’s 765432 for instance. And if I scroll down, we’ve got things like email, we’ve got website and we’ve got full address and full name.

So you can see fairly easy to use. All you need to do is add in the relevant component in AI builder here in insert and you’ve got business card reader, receipt processor, form processor, object detector and text detector. So with the receipt processor we’ve got things like merchant name, address, phone transaction, date, time, purchase items, which is a list containing name, price, quantity and total price. With object detector we got things like original image group results and results tag name for instance.

And in form processor we’ve got things like fields tables and results value results, page name results confidence and so forth. So it’s fairly easy to use these AI builders. All you have to do is insert the relevant component and then just get the name of it and start typing. Press the dot and see what properties you’ve got.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!