1
00:00:00,330 --> 00:00:03,030
So in the last section, you've made your API.

2
00:00:03,480 --> 00:00:09,900
No, that's true, that API into an actual full webpage that someone or anyone in the world with internet

3
00:00:09,900 --> 00:00:11,680
access can use.

4
00:00:11,730 --> 00:00:14,910
So let's open the book 75 and let's see how we do that.

5
00:00:15,600 --> 00:00:17,010
So let's begin here.

6
00:00:17,430 --> 00:00:19,590
We're opening that notebook.

7
00:00:20,820 --> 00:00:23,280
So let's plug in my repo here.

8
00:00:24,610 --> 00:00:29,880
Install flask and grub install.

9
00:00:30,690 --> 00:00:32,040
Navigate to the directory.

10
00:00:32,040 --> 00:00:35,580
Download the file and install it.

11
00:00:42,550 --> 00:00:47,680
Next, we have my what could there that is, Steve, that he did in the previous lesson.

12
00:00:49,150 --> 00:00:53,440
So now let's take a look at this file so you can see it looks quite simple.

13
00:00:53,590 --> 00:00:55,180
This is all the code there is.

14
00:00:55,270 --> 00:00:56,350
So what is this doing?

15
00:00:57,010 --> 00:01:05,860
So basically, we have in the GetUp report clue and we have the files that do the common functions here

16
00:01:05,860 --> 00:01:10,270
that do to do computer vision parts that you can take a look at these if you want.

17
00:01:10,750 --> 00:01:16,330
It's basically this one that gets to model, transforms the image and then formats the class name as

18
00:01:16,330 --> 00:01:18,220
well so that it returns it to the user.

19
00:01:19,540 --> 00:01:25,450
And we also have the inference function here, which is what I was looking for.

20
00:01:25,930 --> 00:01:32,200
This is one that takes to gets a prediction out of it from the transform and get model classes sort

21
00:01:32,200 --> 00:01:32,890
of functions.

22
00:01:33,550 --> 00:01:37,660
So basically this we have all the functions that we need here.

23
00:01:37,670 --> 00:01:43,770
We have flash, we have in grok, we have post requests and also can get requested.

24
00:01:43,780 --> 00:01:45,430
But let's look at the post requests here.

25
00:01:46,030 --> 00:01:52,740
So it actually loads a little website and that website here is index HTML so indexed.

26
00:01:52,750 --> 00:02:01,120
Each HTML is live in Templates directory and that basically consists of the HTML site.

27
00:02:01,120 --> 00:02:02,680
We can take a look at that here.

28
00:02:03,340 --> 00:02:08,050
This is the HTML of the webpage that we'll be deploying to the web.

29
00:02:08,380 --> 00:02:11,230
Once we start this app up, so enough talk.

30
00:02:11,230 --> 00:02:13,060
Let's see this and maybe can help you.

31
00:02:13,900 --> 00:02:16,780
This can help you understand better what we're doing.

32
00:02:16,990 --> 00:02:22,540
So let's click this link here and you're going to get or I didn't get to Google warning me because I

33
00:02:22,540 --> 00:02:23,560
opened it up before.

34
00:02:24,100 --> 00:02:29,250
So now we can upload an image here, so let's take a look.

35
00:02:29,260 --> 00:02:30,430
The screenshots?

36
00:02:32,260 --> 00:02:35,770
Let's go to my downloads, which is quite messy right now.

37
00:02:37,720 --> 00:02:40,570
What would be a good image to use?

38
00:02:42,010 --> 00:02:44,080
Actually can try a random QR code.

39
00:02:44,800 --> 00:02:45,920
Let's see what happens.

40
00:02:46,030 --> 00:02:50,050
This was a QR code I was doing some test with and it says Packet.

41
00:02:50,590 --> 00:02:52,380
So not that cool.

42
00:02:52,390 --> 00:02:53,620
Let's try something else.

43
00:02:53,950 --> 00:03:01,690
So, OK, so let's try this very nice split of a bowl of ramen soup.

44
00:03:02,230 --> 00:03:03,940
Let's see what our classifier thinks.

45
00:03:03,940 --> 00:03:05,060
It is remote.

46
00:03:05,100 --> 00:03:06,610
It is trained on image that.

47
00:03:06,730 --> 00:03:09,310
So let's see, it sets pot pot pipe.

48
00:03:10,450 --> 00:03:11,110
It's kind of cool.

49
00:03:11,170 --> 00:03:11,860
Let's try.

50
00:03:11,860 --> 00:03:16,390
Another image from my satellite was Try this chihuahua.

51
00:03:16,780 --> 00:03:18,010
Well, let's see what happens.

52
00:03:19,090 --> 00:03:19,630
Jhalawar.

53
00:03:19,660 --> 00:03:20,430
So we've got it right.

54
00:03:20,440 --> 00:03:24,400
So you can see our little web up here is working quite well.

55
00:03:24,640 --> 00:03:26,770
Let's try some fireworks.

56
00:03:26,980 --> 00:03:28,780
Yeah, let's see if it has fireworks.

57
00:03:28,780 --> 00:03:37,660
As a class surgeon, it did not have fireworks in the class, so I'm guessing maybe fireworks can look

58
00:03:37,660 --> 00:03:39,460
like a sea and perhaps actually can.

59
00:03:39,820 --> 00:03:41,800
It's kind of cool that it could, actually.

60
00:03:42,490 --> 00:03:46,480
Let's take a look at this dog here.

61
00:03:46,640 --> 00:03:48,670
Rottweiler, if he gets that one.

62
00:03:49,690 --> 00:03:51,160
And you can see it's working quite well.

63
00:03:51,700 --> 00:03:54,760
So that's it for this section here.

64
00:03:54,790 --> 00:03:55,750
Hope you enjoyed it.

65
00:03:56,110 --> 00:04:02,590
And Gronk and Flask make it very easy to test these web apps in the cloud so you can experiment here

66
00:04:02,590 --> 00:04:04,390
where you can experiment on your local machine.

67
00:04:04,870 --> 00:04:06,730
Would running this on your local machine?

68
00:04:06,730 --> 00:04:12,820
You don't need an grok anymore, but however you do if you want to actually host it and a web if you

69
00:04:12,820 --> 00:04:17,560
don't, you can just access it to your local host address here, and it's going to be something similar

70
00:04:17,560 --> 00:04:18,730
to this as well.

71
00:04:19,720 --> 00:04:25,570
So thank you for watching, and we'll stop there for now, and I'll see you in the next section.

72
00:04:25,660 --> 00:04:26,080
Thank you.
