1 00:00:00,330 --> 00:00:05,760 Hey, everybody, so we just saw the power of the Clarify API. 2 00:00:06,000 --> 00:00:07,930 It's pretty exciting, isn't it? 3 00:00:08,400 --> 00:00:15,210 Some really, really cool functionality and lots of possibilities now because I want to make sure that 4 00:00:15,210 --> 00:00:23,220 everybody gets through this course and you're able to successfully finish the app, deploy the app and 5 00:00:23,220 --> 00:00:24,750 show it off on your portfolio. 6 00:00:25,050 --> 00:00:29,970 I've made this video to just show you some of the common issues people might have. 7 00:00:29,970 --> 00:00:33,700 Also some of the power that you now have with clarify. 8 00:00:34,050 --> 00:00:35,510 So let's go through it. 9 00:00:36,240 --> 00:00:42,270 One is that I'm going to provide code for you at the end of each of the sections that are coming up 10 00:00:42,510 --> 00:00:48,780 as we build our Smart Brain app into more and more complex things with the back end, with the database, 11 00:00:49,320 --> 00:00:53,220 I'm going to provide code that you can always come back to. 12 00:00:53,370 --> 00:00:59,910 Let's say you are unable to code along or you don't know why your app isn't working. 13 00:01:00,750 --> 00:01:03,140 There's going to be different versions of the app. 14 00:01:03,570 --> 00:01:08,780 Obviously, this is going to be the first version that I'm going to link to at the end of this section. 15 00:01:09,480 --> 00:01:14,400 So one is the front end, which is called face recognition brain, at least for now. 16 00:01:14,670 --> 00:01:19,950 And then the next one is the face recognition brain API, which is the back end that we're going to 17 00:01:19,950 --> 00:01:21,870 build in later sections. 18 00:01:22,650 --> 00:01:25,130 But let me show you how things would work. 19 00:01:25,140 --> 00:01:32,790 Let's say we cloned both of these repos and they both have read me to show you how to get started again. 20 00:01:32,910 --> 00:01:38,340 Don't worry, because the API we're going to work on in later section and the front end, we still have 21 00:01:38,340 --> 00:01:39,180 a little bit to go. 22 00:01:39,850 --> 00:01:44,830 The one thing that you want to make sure is that you grab your own clarify API key. 23 00:01:45,630 --> 00:01:51,300 So clarify, although the website might change, is still going to have the same functionality. 24 00:01:51,450 --> 00:01:58,350 You're going to have to sign up if you don't have an account or you can just log in and once you log 25 00:01:58,350 --> 00:02:00,870 in, it's going to take you to their dashboard. 26 00:02:02,720 --> 00:02:07,670 Now, in my case, I already have an application built, but otherwise you can just click on create 27 00:02:07,970 --> 00:02:13,700 application and once you do that, it's going to ask you to put in the name some details. 28 00:02:13,940 --> 00:02:16,910 And then from there, you'll have this dashboard. 29 00:02:18,340 --> 00:02:25,420 Now, all we have to do is just click on Create New APIC, you can leave all the check boxes checked 30 00:02:25,540 --> 00:02:28,760 and just create an API key from here. 31 00:02:28,820 --> 00:02:30,840 This is your API key that you can use. 32 00:02:30,850 --> 00:02:31,930 So you just copy it. 33 00:02:33,710 --> 00:02:36,680 You added into the. 34 00:02:37,710 --> 00:02:39,570 Source app, dodgiest file. 35 00:02:42,030 --> 00:02:44,370 And you'll see here that I left it. 36 00:02:46,430 --> 00:02:49,260 For you to enter, it says your API key here. 37 00:02:49,310 --> 00:02:52,760 So you're going to replace that string with the API key. 38 00:03:01,750 --> 00:03:04,950 And you should be good to go, at least for now. 39 00:03:06,100 --> 00:03:12,850 Let's look at the map, so I'm just going to start the server and the front end. 40 00:03:13,240 --> 00:03:19,000 Don't worry, this part you haven't done yet, but I just want to debug the app with you just so you 41 00:03:19,000 --> 00:03:21,700 can see some of the common mistakes that people have. 42 00:03:28,180 --> 00:03:31,900 So I'm just going to sign in with an account that I've already created for this app. 43 00:03:32,940 --> 00:03:37,530 You see that I remember remembers my name, one thing is that Chrome has a new security feature. 44 00:03:38,520 --> 00:03:43,620 But again, this is our app that we're just starting off with, so you can just click, OK, if you 45 00:03:43,620 --> 00:03:45,140 get that prompt, not a big deal. 46 00:03:45,450 --> 00:03:48,480 And I have an image here, which is Tom Hanks. 47 00:03:49,080 --> 00:03:58,170 Let's copy that, making sure that we always copy a JPEG image, not a format that our app won't understand. 48 00:03:58,200 --> 00:04:02,640 So it's always a good idea to do a jpeg, an actual link to an image like this. 49 00:04:03,360 --> 00:04:06,900 And if I paste this in and I detect. 50 00:04:08,070 --> 00:04:13,470 Look at that, it detects the face and it puts a box around the face, very, very cool. 51 00:04:14,690 --> 00:04:22,220 Now, the cool thing with clarify is that, well, it's got multiple models that we can use in our case, 52 00:04:22,220 --> 00:04:24,220 we're using the face detection model. 53 00:04:24,680 --> 00:04:31,400 Now, when we use an API, sometimes a server goes down or an API doesn't work, especially since we're 54 00:04:31,400 --> 00:04:32,490 using the free version. 55 00:04:32,780 --> 00:04:37,160 So a good way to check if the API is working is to go to a link. 56 00:04:37,160 --> 00:04:44,690 I'll provide for you after this lecture where it actually checks the face detection model so you can 57 00:04:44,690 --> 00:04:47,690 actually see that the face detection model here is working for them. 58 00:04:47,990 --> 00:04:53,030 If it's not working well, then this blue box wouldn't appear on this website. 59 00:04:54,080 --> 00:04:57,160 So this is a good way to try and make sure that their model works. 60 00:04:58,490 --> 00:05:02,310 You can also go to their documentation, so this is what we're going to be using. 61 00:05:02,330 --> 00:05:09,170 We're going to be using the predict images and we go to the JavaScript tab to actually learn about the 62 00:05:09,170 --> 00:05:11,090 clarify models in the future. 63 00:05:11,100 --> 00:05:16,610 We can even do videos if we want, predicting whatever video information we feed it. 64 00:05:17,660 --> 00:05:23,100 And also this model gallery to show you that there's different things that we can do. 65 00:05:23,120 --> 00:05:24,470 We have celebrity model. 66 00:05:24,470 --> 00:05:25,970 We have apparel model. 67 00:05:26,720 --> 00:05:28,040 We have color model. 68 00:05:29,040 --> 00:05:31,710 So there's a lot of cool things that we can do. 69 00:05:33,520 --> 00:05:36,610 Such as the general model with our app. 70 00:05:37,670 --> 00:05:45,170 Now, the reason I'm showing you this is because sometimes a model might be working, might not be working, 71 00:05:45,170 --> 00:05:50,030 and I already shows you how to test if a model is working, but if you're getting any errors. 72 00:05:51,100 --> 00:05:58,450 I've provided a little rehme for you, especially when we call the clarify phase detect model, so another 73 00:05:58,450 --> 00:06:01,330 option is to use this piece of string. 74 00:06:01,360 --> 00:06:10,150 I've added comments here for you to decide so I could actually change this from clarify face to tech 75 00:06:10,150 --> 00:06:11,800 model to a string. 76 00:06:12,740 --> 00:06:18,430 And if the clarify face model isn't working, this should still work. 77 00:06:18,910 --> 00:06:20,560 So let me sign in again. 78 00:06:27,170 --> 00:06:28,310 Let's grab Tom Hanks. 79 00:06:29,310 --> 00:06:30,150 Face again. 80 00:06:31,530 --> 00:06:33,520 And you see that that is working as well. 81 00:06:34,050 --> 00:06:38,550 So that is another option in case the clarify model is a working. 82 00:06:40,170 --> 00:06:45,630 Or maybe you want to expand your app once you're done with the course and don't worry, you'll get there. 83 00:06:45,990 --> 00:06:49,300 You can try different models that they have. 84 00:06:49,770 --> 00:06:55,980 So remember, there's different types of face to tech models or different types of models that they 85 00:06:55,980 --> 00:06:56,200 have. 86 00:06:56,220 --> 00:07:00,210 So let's say we do the general model. 87 00:07:01,440 --> 00:07:07,830 And in here, let's just consider the response or say console log, hey, let's see what kind of response 88 00:07:07,830 --> 00:07:09,840 we get with a general model. 89 00:07:11,130 --> 00:07:14,220 So, again, I'm going to go back in to our app. 90 00:07:15,810 --> 00:07:17,940 Grab our good old friend, Tom Hanks. 91 00:07:20,510 --> 00:07:26,510 Pieces in here, I'm going to open up the developer console to see what we get and I had detect. 92 00:07:30,240 --> 00:07:34,560 All right, we don't have to worry about this error, it's the error is because we're not using the 93 00:07:34,560 --> 00:07:38,190 face detect model, so it doesn't understand how to put the box around it. 94 00:07:38,340 --> 00:07:41,140 But because we're using the general model. 95 00:07:41,160 --> 00:07:41,880 Check this out. 96 00:07:42,990 --> 00:07:50,730 If we now go to Output's Zero and data, this is the data that the general model returns for us. 97 00:07:50,760 --> 00:07:51,480 And check this out. 98 00:07:51,510 --> 00:07:52,440 This is really cool. 99 00:07:53,340 --> 00:08:00,360 It returns for us, concepts and concepts are look at that, it understands the picture or at least 100 00:08:00,360 --> 00:08:08,640 the model does it, saying the picture is of tag people, it's 90 percent confident of a politician. 101 00:08:08,670 --> 00:08:14,760 Ninety seven percent confidence of a portrait of a one man, of a business of administration. 102 00:08:14,880 --> 00:08:16,560 It's a press conference, banking. 103 00:08:17,070 --> 00:08:20,180 So kind of cool it understands the picture. 104 00:08:20,460 --> 00:08:28,030 So by just changing the model, I was able to learn new information about the picture. 105 00:08:28,140 --> 00:08:35,610 So after this course, if you want to explore and do something other than face, detect maybe an app 106 00:08:35,610 --> 00:08:40,440 that describes what the picture is and displays it, that's another cool option. 107 00:08:41,860 --> 00:08:47,980 So, again, the reason I am showing you this is that there's a lot of cool things that you can do with 108 00:08:47,980 --> 00:08:48,670 clarify. 109 00:08:48,790 --> 00:08:55,720 The reason I've used it for this course is because it allows all of you to build different apps that 110 00:08:55,840 --> 00:08:58,220 don't just look the same for everyone. 111 00:08:58,750 --> 00:09:01,230 So hopefully this gets you excited. 112 00:09:01,420 --> 00:09:05,410 And I'll link to a bunch of resources for you to check out that. 113 00:09:05,410 --> 00:09:10,330 Once you're done with the app, you're done with the course, you're going to have different ways to 114 00:09:10,330 --> 00:09:11,410 customize everything. 115 00:09:12,500 --> 00:09:14,150 All right, that's a lot of talk for me. 116 00:09:14,330 --> 00:09:15,310 I'll see you in the next one. 117 00:09:15,350 --> 00:09:15,760 Bye bye.