1
00:00:00,120 --> 00:00:00,600
Hi, guys.

2
00:00:00,900 --> 00:00:07,950
So in this video, we complete our our application, so here I went, I will write the code for this

3
00:00:07,950 --> 00:00:09,140
applique, for this function.

4
00:00:09,330 --> 00:00:11,090
So this function is we do it.

5
00:00:11,100 --> 00:00:16,890
We of use the dialog to define the path of the image that we want to to predict.

6
00:00:17,220 --> 00:00:23,700
Then what we have to do this after clicking on this button, will open the image and put it here in

7
00:00:23,700 --> 00:00:24,630
the frame.

8
00:00:24,930 --> 00:00:27,180
So we'll put it here in the frame.

9
00:00:27,450 --> 00:00:31,060
Then after keying in this button, we will see the name of the word.

10
00:00:31,290 --> 00:00:36,960
So what we have to do in this video will do this stuff, which means choosing the image or choosing

11
00:00:36,960 --> 00:00:44,700
the path of the image, then doing the deciding stop using below that after that would put it here in

12
00:00:44,700 --> 00:00:46,170
this application, in this video.

13
00:00:46,230 --> 00:00:50,490
OK, so I will delete this stuff.

14
00:00:50,670 --> 00:00:56,760
Now, once we have to, do we have a path which is which will be the part, but this variable will need

15
00:00:56,760 --> 00:00:57,930
it in the other function.

16
00:00:58,110 --> 00:01:00,980
So it will be global global variable.

17
00:01:01,230 --> 00:01:04,640
So for that I will I will put it here.

18
00:01:04,650 --> 00:01:12,900
For example, I would put global stuff like this, then I will initializes into like this.

19
00:01:12,930 --> 00:01:17,280
OK, now here we should do the same thing here.

20
00:01:17,850 --> 00:01:18,900
Global buff.

21
00:01:20,190 --> 00:01:22,360
Ladies now would work with this.

22
00:01:22,380 --> 00:01:25,230
So what we have to do is only to use the dialogue.

23
00:01:25,590 --> 00:01:27,270
I didn't import it here.

24
00:01:27,280 --> 00:01:29,310
So here we have import.

25
00:01:30,830 --> 00:01:32,940
From I think from file.

26
00:01:35,070 --> 00:01:43,950
I don't remember exactly it is thrown into the classroom to eat, to serve, to continue caught called

27
00:01:44,580 --> 00:01:47,960
find, they are like this, so we will use it here.

28
00:01:47,970 --> 00:01:54,650
We have equal fire dialogue that ask for name like this.

29
00:01:54,690 --> 00:02:02,130
OK, so what's this function will open a window or a widget so that we choose any image.

30
00:02:02,310 --> 00:02:07,430
We ask that this part of the image or something will be to turn on this variable.

31
00:02:07,770 --> 00:02:08,750
We see it here.

32
00:02:09,810 --> 00:02:12,180
Not if I will click and open, I will choose.

33
00:02:12,180 --> 00:02:15,590
For example, this image was for the we can see nothing if we want to see it.

34
00:02:15,600 --> 00:02:17,340
For example, we can do this here.

35
00:02:17,790 --> 00:02:22,860
I can print it so we have a resource zone that's config.

36
00:02:23,370 --> 00:02:25,620
Then you we have tags equal.

37
00:02:26,400 --> 00:02:33,490
But so now if I will click and I will choose this one, for example, it will print it like this here.

38
00:02:33,510 --> 00:02:34,980
So this is the part that we will need.

39
00:02:36,330 --> 00:02:39,510
So here is this first part.

40
00:02:39,540 --> 00:02:42,890
I will delete this one because we don't need it to be an example.

41
00:02:43,140 --> 00:02:49,290
Now, what we have to do with you, we would open the image using below with this, but after that we

42
00:02:49,290 --> 00:02:50,070
resize it.

43
00:02:50,070 --> 00:02:53,010
And if after the resizing, which is in the frame.

44
00:02:54,560 --> 00:03:06,780
So to do that, I need to import the video library so from an import image and image ticket like this.

45
00:03:07,400 --> 00:03:11,620
Now here we have this part.

46
00:03:12,290 --> 00:03:18,690
But before doing this, what we have to do, because if you want to have a good application, so if

47
00:03:18,710 --> 00:03:26,350
the bus if I click here, for example, and I don't choose any parts like this, and after hours of

48
00:03:26,360 --> 00:03:32,990
doing this, I will try to open an image using that's not choosing a path, which means it will be always

49
00:03:32,990 --> 00:03:33,290
done.

50
00:03:33,590 --> 00:03:35,560
So it will cause a problem with this.

51
00:03:35,810 --> 00:03:42,200
I think that we had this this problem before for the application that we created to convert images from

52
00:03:42,200 --> 00:03:42,980
being easy to do.

53
00:03:44,060 --> 00:03:47,460
So we fixed this one by only using one condition.

54
00:03:47,480 --> 00:03:55,640
If so, if bust means that if it's true, which means if pot is not equal to none, then after that

55
00:03:55,640 --> 00:03:58,210
we open the image and we'll do the other stuff.

56
00:03:58,520 --> 00:04:05,180
So you should only always do this path so that your application will not the user will use your application,

57
00:04:05,180 --> 00:04:07,910
will not have a problem with this kind of stuff.

58
00:04:07,940 --> 00:04:12,440
OK, so here we have Portmans doesn't equal to a nun.

59
00:04:12,890 --> 00:04:15,520
Now who would open the emissary.

60
00:04:15,740 --> 00:04:17,630
I would create a very good image.

61
00:04:17,630 --> 00:04:21,690
Does this will I restore honor to the image that would open?

62
00:04:22,070 --> 00:04:29,180
So here we have image like this that's open the parts of the image that we have chosen.

63
00:04:30,110 --> 00:04:34,280
Then after opening its resize, it's so image it cool.

64
00:04:35,950 --> 00:04:43,790
Image the Tresize like it is that the sorts of images, as always, are the new with a new high.

65
00:04:43,840 --> 00:04:52,650
So I would put down 400 by 400 at the same size of the frame, which is what is it, which is this one.

66
00:04:52,930 --> 00:04:55,720
So it will fit the frame for the whole size of it.

67
00:04:56,230 --> 00:05:00,100
Now, here, the second parameter, which is image that's.

68
00:05:01,470 --> 00:05:09,480
And it is this and obviously this not after something that I think it's we should converted it into

69
00:05:09,480 --> 00:05:12,410
something that will be shown in the application.

70
00:05:12,720 --> 00:05:17,100
So here we have image, then here we have image.

71
00:05:17,100 --> 00:05:19,350
Teekay, the photo image.

72
00:05:19,680 --> 00:05:22,310
Then here we have to put the image like this.

73
00:05:22,890 --> 00:05:28,380
Now, after doing this, we can put the image on the on the label using the same function, which is

74
00:05:28,380 --> 00:05:28,830
graphic.

75
00:05:29,070 --> 00:05:29,880
But we see this.

76
00:05:29,880 --> 00:05:31,350
We cannot see it for the moment.

77
00:05:31,350 --> 00:05:35,190
You will see here we have, I expect this so that you will see.

78
00:05:35,610 --> 00:05:42,540
And I think that we had this problem also when we created the application for the conversion therapy

79
00:05:42,540 --> 00:05:43,380
as user GBG.

80
00:05:43,650 --> 00:05:49,060
So I will show you again, and I hope that you will remember that we had this problem before and you

81
00:05:49,070 --> 00:05:50,660
will see that how you can fix it.

82
00:05:51,180 --> 00:05:59,590
So to do this, we have resolved on that config and here we have image as we had before we used text.

83
00:05:59,610 --> 00:06:02,920
Now here we have image then equals two image.

84
00:06:03,150 --> 00:06:04,530
So this one is the function.

85
00:06:04,530 --> 00:06:06,390
That's all the parameter of this function.

86
00:06:06,630 --> 00:06:10,320
And this one is the image that we will open like this.

87
00:06:11,190 --> 00:06:16,320
Now we've created here I click and I will choose image, but you can see this.

88
00:06:16,320 --> 00:06:17,250
We can see nothing.

89
00:06:17,400 --> 00:06:17,850
Why?

90
00:06:18,240 --> 00:06:20,040
Because we had this problem before.

91
00:06:20,040 --> 00:06:26,940
As I told you, if we are working with this frame is here and we are trying to put something on the

92
00:06:26,940 --> 00:06:34,140
frame or onto the label, but in another function so that we should post this image as a global variable

93
00:06:34,260 --> 00:06:39,960
so that it will be shown all of it will be known in this frame, because if we don't, we don't do that.

94
00:06:39,960 --> 00:06:42,720
We cannot see it here and it will not be projected.

95
00:06:43,350 --> 00:06:50,520
So here what we have to do is always the same thing here, here, for example, global image.

96
00:06:50,520 --> 00:06:54,780
So this image will not be only a local variable, it will be global variable.

97
00:06:54,780 --> 00:07:00,160
So we can put this in label, which is here in the center of the of the function.

98
00:07:00,660 --> 00:07:07,140
So now we can see is if I will choose any words here, there is a problem also.

99
00:07:07,140 --> 00:07:10,890
We can we will see this.

100
00:07:11,370 --> 00:07:13,120
Sorry, sorry, sorry, sorry, sorry.

101
00:07:13,140 --> 00:07:19,410
Here the problem is I choosing the wrong zone which is here, the print image.

102
00:07:19,410 --> 00:07:19,790
Sorry.

103
00:07:20,310 --> 00:07:23,340
So here we will put it on this one.

104
00:07:23,350 --> 00:07:24,670
I will try to open.

105
00:07:24,990 --> 00:07:28,380
So here is the image as we can see the same thing here.

106
00:07:28,380 --> 00:07:31,380
If I will take this off, we cannot see it.

107
00:07:31,440 --> 00:07:36,030
How we see this, if I will choose any image, we cannot see.

108
00:07:36,090 --> 00:07:39,300
So we can put it as global like this.

109
00:07:40,320 --> 00:07:43,180
So that it will be known outside the function.

110
00:07:43,590 --> 00:07:48,400
So now you can see that we have we did almost the whole work, which is opening the image.

111
00:07:48,440 --> 00:07:52,950
You know, now all what you have to do is to create the function for this person.

112
00:07:52,950 --> 00:07:54,590
And you see, this is very easy.

113
00:07:54,840 --> 00:07:59,880
We only call this function predicts, which is this one then will use it to do this stuff.

114
00:07:59,880 --> 00:08:02,240
And we'll leave this to the last video.

115
00:08:02,520 --> 00:08:04,630
So I see you in the next video by.
