Hi everyone will come back.
So in this video you are actually done from the previous video just as we usually do when I was trying
to build the project.
I usually move it from this folder here to this folder so that I have enough cash to.
So I don't have to download last and other stuff from the from again and again.
But you don't need to do that if you have a good Internet connection you can just go stay at image classification
and you Sudhakar can both build and so came up for now you've done all the project files so this is
tutorial one so I've moved in here.
And then you can see it's exactly the same.
So when there's inception our model and everything is very similar.
OK.
So basically copying the files in image classification and put it in utero.
Some of that go into tutorial one you can go into you can remain in misclassification is the same thing
that can do Sudhakar compose and then build a case and to build the project.
Again and then now I'm going to use it to the operator compose.
So now I'm going to fire up the project
or call so we have the project running now and then we were going to open post man to start sending
some requests to the API.
So a postman opens.
Let's see what we are going to be testing.
So here is Boseman.
We're going to be sending at slash register slash classify and slash freesheet.
OK.
So let's go back to both men making sure that it opens and everything is running.
So for register we're going to we're going to be giving the argument username and password for for classified.
We're going to give username password and then you are out of the image.
And finally for what we feel we're going to get the user name admin password and amount.
OK.
So we could actually go to a postman if you go to post man we can come here and we can write all four
of them.
OK so I couldn't write user names so you can see it already.
The Viride it's all in or register.
And then you can see here that I have a username password.
You are l admin password amount.
So I wrote all of them and then for each of these back ends and they're only going to use the fields
that they need.
OK.
All right so now let's me can you use or so for user Nerima are I for broke for password I'm literate
secure as my password.
You are.
Well we all we want to you are ELF a photo.
OK.
Let's go to Firefox and then let's search for a photo of let's say a zebra.
OK.
So I'm going to ride zebra and then we go to images and then let's take this image of this cute zebra
over here.
We're going to right click and then we're going to say copy image location.
OK.
So I'm going to clean copy image location.
Now if you go in a new tab and you click and you paste this then let's see.
So.
So it ended up copying the image in base 64.
So this is not what we need.
So let's try to copy another image or fire off a zebra but this time let's hope that is JPI OK.
So indeed it is.
So in this one you can see here that the file is dot GBG.
OK.
So when I dig this link over here and then copy it there go to a post map and paste it in there you
are.
All right.
So let's see what our model or our API predicts for this image over here.
Now for the admin password is ABC 1 2 3.
And if I ever end up refilling I'm just going to refill it.
OK.
All right so now what Send send this.
OK so I'm going to send to register first and it tells me successfully signed up for the API.
All right cool so I've read your story.
I have some tokens so I'm going to go right.
Classified.
I'm going to hit the API and declassify.
So let's see let's see if we can maybe zoom in a bit here.
It's not quite a bit.
OK.
So that's better.
So we we're going to hit the API and slash classify and then we're going to be using this you are able
to classify this image that we just pasted.
So I'm going to send this over and let's see what this ends up being.
So it's going to take a while because the model takes a look a little bit each time to compute what
this image is.
So this model takes a bit of time and few seconds for five or six seconds.
So as you see it's loading and it's finally done.
So let's have a look at the results so you can see that the first result this shows is zebra and its
confidence is 0.9 forces.
So that means that it's ninety four point six percent that it's a zebra.
OK.
So that's pretty cool.
We found out that the first this image is a zebra with the confidence of ninety four point six percent.
It all shows things that it's hard to be used with a probability of 1 percent or 0.1 percent actually
Tiger with probability zero point zero or 1 0 9 percent.
An ostrich with a probability of zero point zero zero or six percent.
OK.
So it's obvious you that this image has a Z.
OK.
Now let's try another image let's try for example.
Bander.
OK.
So we're going to come here and then we right a panda and then cookie enter and then I take this cute.
I met this cute panda.
We got a copy that image location Minshew image loads.
So in this case again we got the image basics.
Of course so we want to direct image.
So let's see if this one works.
So we're going to copy that image again.
It's a 64.
So let's see maybe this one copy image location OK so you found one.
So this one is the image over here.
And it is not it's not 64.
So we're going to do this you're all here.
OK.
And then we're going to sit and try and classify the air so it's going to take a few seconds and we
get our response back.
And you can see here it says a giant panda or a panda a panda bear couldn't bear or I know preowned
Milone the new cat.
OK so that's probably the biological name and it's confidence is 0.9.
So are you sure that's ninety three point two percent.
We're ninety three point three percent.
So that SuperCoach right into this image is a panda.
And so you can see here why this is very powerful is.
People get images or developers get images and they can automatically know what this image has.
OK so that's very strong very powerful.
So hopefully you see the idea of this year.
So yeah this is basically the API in fact you can you know sell this API if you hosted and then you
make people pay for your tokens then you're technically you know you can charge for it.
Some people actually do.
And let's first run out of something I keep canceling me the want to send to several classification
requests so that I can finish my tokens and then I want to refill and tokens OK.
So I'm going to go.
We.
Keep sending the requests until I run out of tokens and it tells me hey sorry you need to.
So it's got take a few seconds.
I'm going to keep doing this until it runs out.
So I'll pause now and I'll call you back once I've run out of tokens.
OK.
All right so welcome back.
So you can see here it says the message not enough tokens and three or three so I've run out of tokens
to run for the classify.
So I'm going to go hit this last refill and then I input the correct admin password and the amount.
And then I'm going to send.
OK.
It does not tell me.
You have refilled and the status is 200 success.
And then if I try to classify again last time you told me you don't have enough tokens but this time
is gone tell me is going give me the prediction.
So let's see.
So let's wait for a second.
And here it is.
So the giant panda panda panda bear could bear.
And so.
OK.
So this is all the API this is ready to be deployed if you do a few security checks.
First of all like make sure that you are.
That was sent to you.
For example to secure and not.
Like for example probably has some malware storm into it.
So if you verify all of these things it should be ready to deploy.
And you can actually ask people to pay you to use your EPA.
OK.
So hopefully you found that pretty cool.
Brianna stop here and I'll see you the next video.
So until then happy Cody.