1
00:00:00,000 --> 00:00:01,000
Hello guys!

2
00:00:01,000 --> 00:00:04,000
Now we have developed so many different applications.

3
00:00:04,000 --> 00:00:11,000
Now I will just try to show you how you can go ahead and deploy this kind of applications.

4
00:00:11,000 --> 00:00:15,000
So from all these examples you can take up any example that you want.

5
00:00:15,000 --> 00:00:20,000
But I will go ahead and take this particular search engine which I had actually developed.

6
00:00:20,000 --> 00:00:22,000
So I will go into its file.

7
00:00:22,000 --> 00:00:22,000
Right.

8
00:00:23,000 --> 00:00:27,000
So when I probably go over here you'll be able to see all these files I have actually arranged in this

9
00:00:27,000 --> 00:00:27,000
way.

10
00:00:27,000 --> 00:00:32,000
So this is my V and V folder and this is my requirement dot txt.

11
00:00:32,000 --> 00:00:35,000
Now to start the work over here.

12
00:00:35,000 --> 00:00:42,000
What I am actually going to do is that I will take this requirement dot txt I will copy this inside

13
00:00:42,000 --> 00:00:43,000
this particular folder.

14
00:00:43,000 --> 00:00:47,000
And this is what is my search engine right now.

15
00:00:47,000 --> 00:00:54,000
Let me just go ahead and deploy this entire application in a Streamlit web app or Streamlit cloud.

16
00:00:54,000 --> 00:01:00,000
Okay, so since this is a Streamlit web app, I will try to go ahead and show you first the deployment

17
00:01:00,000 --> 00:01:02,000
with Streamlit Cloud.

18
00:01:02,000 --> 00:01:06,000
So I will just go ahead and type Streamlit Cloud okay.

19
00:01:06,000 --> 00:01:10,000
And I will go ahead and hit enter.

20
00:01:10,000 --> 00:01:14,000
Let me just go ahead and write over here Streamlit cloud.

21
00:01:15,000 --> 00:01:21,000
And now here you'll be able to see that Cloud Streamlit a faster way to build and share data apps.

22
00:01:21,000 --> 00:01:25,000
But before that, let me go to my GitHub account.

23
00:01:26,000 --> 00:01:30,000
Now, inside this particular GitHub account, I hope everybody has this particular account itself.

24
00:01:30,000 --> 00:01:34,000
I will go ahead and create my new repository.

25
00:01:34,000 --> 00:01:34,000
Right.

26
00:01:34,000 --> 00:01:41,000
So let me just go ahead and click on New Repository here I'm going to go ahead and write my search engine

27
00:01:41,000 --> 00:01:42,000
okay.

28
00:01:42,000 --> 00:01:44,000
Search engine LM.

29
00:01:44,000 --> 00:01:45,000
I will just go ahead and write like this.

30
00:01:46,000 --> 00:01:52,000
Then I will add a readme file, and let's say I'm going to add a license of General Public License.

31
00:01:52,000 --> 00:01:54,000
You can select any one that you like.

32
00:01:54,000 --> 00:01:56,000
I will go ahead and click on the repository.

33
00:01:57,000 --> 00:02:00,000
One thing you should understand the reason why I'm using this Streamlit cloud.

34
00:02:00,000 --> 00:02:05,000
Because you will be able to deploy any number of apps over here.

35
00:02:05,000 --> 00:02:08,000
And, uh, you can probably go ahead with the specific deployment.

36
00:02:08,000 --> 00:02:13,000
Now over here inside this particular search engine, I will just go ahead and open my folder.

37
00:02:13,000 --> 00:02:15,000
This is one okay.

38
00:02:15,000 --> 00:02:18,000
I will quickly go ahead and select all these files.

39
00:02:18,000 --> 00:02:20,000
Drag and drop it inside this okay.

40
00:02:20,000 --> 00:02:24,000
So quickly I will go ahead and drag and drop it okay.

41
00:02:24,000 --> 00:02:30,000
And I know I don't even require this ipynb because I just require this app.py and requirement dot txt.

42
00:02:31,000 --> 00:02:35,000
So let me just close this and let me commit the changes.

43
00:02:36,000 --> 00:02:40,000
So once I commit the changes now I have my entire URL.

44
00:02:40,000 --> 00:02:44,000
Now quickly let's go to the Streamlit cloud and I will go ahead.

45
00:02:44,000 --> 00:02:47,000
And first of all sign in here.

46
00:02:47,000 --> 00:02:52,000
You will be able to deploy any kind of Streamlit web app in a much more easier way.

47
00:02:52,000 --> 00:02:56,000
Let it be an generative AI application, let it be a machine learning application.

48
00:02:56,000 --> 00:02:57,000
Anything as such.

49
00:02:57,000 --> 00:03:00,000
So here you can see some of the examples that I have already uploaded.

50
00:03:00,000 --> 00:03:00,000
Okay.

51
00:03:01,000 --> 00:03:06,000
Um, there are a lot of advantages of using this because anyhow, you don't have to pay anything, uh,

52
00:03:06,000 --> 00:03:08,000
with respect to the deployment.

53
00:03:08,000 --> 00:03:10,000
And you'll also be able to get one kind of URL.

54
00:03:10,000 --> 00:03:14,000
But at the end of the day, you'll be having the streamlit.io at the end.

55
00:03:14,000 --> 00:03:14,000
Okay.

56
00:03:15,000 --> 00:03:18,000
So I will go ahead and click on create app.

57
00:03:18,000 --> 00:03:22,000
And uh, it will say that hey, do you already have an app.

58
00:03:22,000 --> 00:03:25,000
So over here it has an option to integrate with the GitHub.

59
00:03:25,000 --> 00:03:29,000
So I will go ahead and click this since I have uploaded in the GitHub.

60
00:03:29,000 --> 00:03:35,000
And as soon as you probably click on GitHub right, it will first of all ask you for the authentication

61
00:03:35,000 --> 00:03:36,000
okay.

62
00:03:36,000 --> 00:03:39,000
So please make sure that you do the authentication with your GitHub account.

63
00:03:39,000 --> 00:03:41,000
You need to have a GitHub account for that.

64
00:03:42,000 --> 00:03:49,000
Now after this I will just go ahead and search for my GitHub URL over here in my repository.

65
00:03:49,000 --> 00:03:55,000
So here you can see Krish Nayak zero six search engine LM and this is my branch main.

66
00:03:55,000 --> 00:03:56,000
I'm in my branch main.

67
00:03:56,000 --> 00:03:58,000
My main file is app dot p y.

68
00:03:59,000 --> 00:04:03,000
So I will just go ahead and click over here and hit on app dot p y.

69
00:04:03,000 --> 00:04:06,000
Please make sure that you need to have a requirement dot.

70
00:04:06,000 --> 00:04:07,000
TXT file over here.

71
00:04:07,000 --> 00:04:11,000
Otherwise it will not understand what all uh environment variables or are.

72
00:04:11,000 --> 00:04:12,000
What?

73
00:04:12,000 --> 00:04:14,000
All libraries it basically requires, right?

74
00:04:14,000 --> 00:04:16,000
So you need to have this specific thing installed.

75
00:04:17,000 --> 00:04:21,000
Now I will go over here and this is the domain that it is showing me.

76
00:04:21,000 --> 00:04:24,000
I will be able to use with this particular domain.

77
00:04:24,000 --> 00:04:25,000
I'll be able to use my web app.

78
00:04:25,000 --> 00:04:32,000
Now along with this, let's say you also need to add some kind of key value pairs, right?

79
00:04:32,000 --> 00:04:34,000
Let's say you want to add some secret keys.

80
00:04:34,000 --> 00:04:39,000
You can just go ahead and give a secret key name is equal to whatever name you have.

81
00:04:39,000 --> 00:04:43,000
You can probably go ahead and display it in this particular manner once you upload it by default.

82
00:04:43,000 --> 00:04:46,000
Here you can see you are having Python three version 3.11.

83
00:04:46,000 --> 00:04:48,000
I'll be using this particular version.

84
00:04:48,000 --> 00:04:54,000
And along with this, uh, any key value pairs like how we have key value pairs over here.

85
00:04:54,000 --> 00:04:55,000
Right.

86
00:04:55,000 --> 00:05:00,000
Like OpenAI API key, my lang chain API key lang chain project access token.

87
00:05:00,000 --> 00:05:04,000
I can also give this particular key by just copying and pasting it over there.

88
00:05:04,000 --> 00:05:10,000
But in order to access this, you know, in my API, if I'm using this key anywhere, I just need to

89
00:05:10,000 --> 00:05:12,000
use s t dot secret.

90
00:05:12,000 --> 00:05:19,000
Okay, I have to use something like this s t dot secret and give my secret key name over here.

91
00:05:20,000 --> 00:05:20,000
Right?

92
00:05:20,000 --> 00:05:25,000
With respect to any keys that I'm actually using, which is put inside my Streamlit cloud.

93
00:05:26,000 --> 00:05:31,000
Let's say if I'm using a chef token, right, I may copy this entire key over here.

94
00:05:31,000 --> 00:05:33,000
I may paste it over here.

95
00:05:33,000 --> 00:05:33,000
Okay.

96
00:05:34,000 --> 00:05:37,000
And then what I will do, I will go ahead and save this.

97
00:05:37,000 --> 00:05:39,000
Now, you know I'm using chef underscore token.

98
00:05:39,000 --> 00:05:41,000
Let's say if I go ahead and save this.

99
00:05:41,000 --> 00:05:43,000
Now here I've just added one secret.

100
00:05:43,000 --> 00:05:49,000
Now in order to access it in my app Dot Pi, I will just go ahead and write SD dot secrets okay.

101
00:05:49,000 --> 00:05:52,000
And this how I will be able to access this.

102
00:05:52,000 --> 00:05:59,000
Okay, so if you really want to know more about it just go ahead and search for Streamlit secrets.

103
00:05:59,000 --> 00:05:59,000
Okay.

104
00:06:00,000 --> 00:06:04,000
And here you will be able to see secret management SD dot secrets.

105
00:06:04,000 --> 00:06:04,000
Right.

106
00:06:04,000 --> 00:06:06,000
If you probably go ahead and use this.

107
00:06:06,000 --> 00:06:09,000
So let's say you are given me a open API.

108
00:06:09,000 --> 00:06:10,000
Open API key.

109
00:06:10,000 --> 00:06:16,000
You just need to write SD dot secrets with respect to, uh, your open API key.

110
00:06:16,000 --> 00:06:17,000
Write open API key over here.

111
00:06:18,000 --> 00:06:22,000
So in your Streamlit app the following values would be true.

112
00:06:22,000 --> 00:06:22,000
Right?

113
00:06:22,000 --> 00:06:24,000
Which is equal to your open API key.

114
00:06:24,000 --> 00:06:27,000
So just by using this particular code you'll be able to use it.

115
00:06:27,000 --> 00:06:32,000
But right now the application that I've actually created, you'll be able to see.

116
00:06:32,000 --> 00:06:35,000
And let me just do one thing before I run this.

117
00:06:35,000 --> 00:06:39,000
Also, I'll remove it because here I don't require any secret key because from the front end I will

118
00:06:39,000 --> 00:06:43,000
be putting my hugging face API token or any token that is required.

119
00:06:43,000 --> 00:06:43,000
Okay.

120
00:06:43,000 --> 00:06:50,000
And here I'm actually using this hugging face endpoint also right to access any kind of things.

121
00:06:50,000 --> 00:06:53,000
Um, so this is my entire, uh, okay.

122
00:06:53,000 --> 00:06:56,000
This, uh, I'm in the wrong tool.

123
00:06:56,000 --> 00:06:56,000
Okay.

124
00:06:56,000 --> 00:06:58,000
This is my API, right?

125
00:06:58,000 --> 00:07:03,000
So in this particular case, you'll be able to see that I'm not using any, any, any kind of secret

126
00:07:03,000 --> 00:07:03,000
key.

127
00:07:03,000 --> 00:07:05,000
I'm just typing it from the front end.

128
00:07:05,000 --> 00:07:05,000
Okay.

129
00:07:05,000 --> 00:07:06,000
My grok API key.

130
00:07:06,000 --> 00:07:10,000
So now what I'll do I'll just go ahead and deploy this okay.

131
00:07:11,000 --> 00:07:13,000
So once I deploy this you'll be seeing that in the back end.

132
00:07:13,000 --> 00:07:18,000
First of all it will go ahead and install all the requirement dot txt first of all right.

133
00:07:18,000 --> 00:07:21,000
So the deployment is very much simple with the help of Streamlit app.

134
00:07:21,000 --> 00:07:22,000
Right.

135
00:07:22,000 --> 00:07:26,000
So now here you'll be able to see that the deployment is basically happening.

136
00:07:26,000 --> 00:07:32,000
And with respect to the deployment over here you will be also seeing that the requirement dot txt will

137
00:07:32,000 --> 00:07:33,000
get installed in the back end.

138
00:07:33,000 --> 00:07:34,000
Okay.

139
00:07:34,000 --> 00:07:39,000
So once it gets installed you will be able to see your entire application okay.

140
00:07:39,000 --> 00:07:42,000
So this is the most easiest way to probably do it.

141
00:07:42,000 --> 00:07:46,000
Uh for before that what I will do quickly I will go to my env file.

142
00:07:46,000 --> 00:07:49,000
Now let me go back to my env file.

143
00:07:49,000 --> 00:07:55,000
I will take this grok API key because this is what I will be required in my application.

144
00:07:55,000 --> 00:07:55,000
Right.

145
00:07:56,000 --> 00:08:00,000
So again based on the requirement dot txt it will take some amount of time.

146
00:08:00,000 --> 00:08:07,000
And let's wait for that time to, you know, do the installation of all my libraries and packages that

147
00:08:07,000 --> 00:08:09,000
I required for that particular project.

148
00:08:09,000 --> 00:08:12,000
And once it does, my project will be ready.

149
00:08:12,000 --> 00:08:15,000
Now you can see the requirement dot txt has run.

150
00:08:15,000 --> 00:08:19,000
And here is my entire Streamlit app right now.

151
00:08:19,000 --> 00:08:22,000
This is how amazing and easy it is.

152
00:08:22,000 --> 00:08:25,000
So I'll just go ahead and copy paste my API key over here.

153
00:08:25,000 --> 00:08:31,000
Once I press enter, I should be able to ask any question.

154
00:08:31,000 --> 00:08:34,000
Okay, tell me about machine learning.

155
00:08:34,000 --> 00:08:37,000
Now here I have created my search engine using agents.

156
00:08:37,000 --> 00:08:38,000
Right.

157
00:08:38,000 --> 00:08:44,000
So here you can see Wikipedia is just thinking okay then Wikipedia invalid tool name some invalid tool

158
00:08:44,000 --> 00:08:46,000
name here it is basically coming.

159
00:08:46,000 --> 00:08:47,000
Search arXiv.

160
00:08:47,000 --> 00:08:49,000
None is a valid tool.

161
00:08:49,000 --> 00:08:50,000
Try one.

162
00:08:50,000 --> 00:08:53,000
So finally you'll be able to see that from search and from RC.

163
00:08:53,000 --> 00:08:58,000
We are not able to get this information, so it will try to give me the information from uh, machine

164
00:08:58,000 --> 00:08:58,000
learning.

165
00:08:58,000 --> 00:08:59,000
Right.

166
00:08:59,000 --> 00:09:02,000
So machine learning is a field of study in artificial intelligence.

167
00:09:02,000 --> 00:09:04,000
Lets me do one more thing.

168
00:09:04,000 --> 00:09:08,000
Let me just go ahead and search for attention is all you need.

169
00:09:08,000 --> 00:09:09,000
Research paper.

170
00:09:09,000 --> 00:09:11,000
So here you can see the number.

171
00:09:11,000 --> 00:09:12,000
It is nothing.

172
00:09:12,000 --> 00:09:15,000
But, uh, I will just search for this.

173
00:09:15,000 --> 00:09:16,000
Ah.

174
00:09:16,000 --> 00:09:18,000
If this particular code.

175
00:09:18,000 --> 00:09:22,000
Okay, so if I go away and search for it, I should be able to get my answer.

176
00:09:22,000 --> 00:09:24,000
So now it is going to my arXiv.

177
00:09:24,000 --> 00:09:27,000
It is probably communicating over here okay.

178
00:09:27,000 --> 00:09:34,000
And here you can see again uh it is probably and finally, you get this particular input, right?

179
00:09:35,000 --> 00:09:39,000
Oh, tell me about generative AI.

180
00:09:39,000 --> 00:09:44,000
I will just go ahead and ask this particular question and see how the cloud is probably providing this

181
00:09:44,000 --> 00:09:45,000
entirely, completely for free.

182
00:09:45,000 --> 00:09:48,000
So you can go ahead and probably do this right.

183
00:09:48,000 --> 00:09:50,000
So here you can see machine learning, generative AI, Wikipedia.

184
00:09:50,000 --> 00:09:53,000
All the communication is specifically happening.

185
00:09:53,000 --> 00:09:58,000
Again, we do not have to probably go to arXiv also because this tool will be more than sufficient with

186
00:09:58,000 --> 00:10:00,000
respect to giving your output right.

187
00:10:00,000 --> 00:10:04,000
And to know more details about it here you can see the user is asking about machine learning and generative

188
00:10:04,000 --> 00:10:05,000
AI.

189
00:10:05,000 --> 00:10:08,000
So both this information, the chat history is also basically being used.

190
00:10:08,000 --> 00:10:09,000
Right.

191
00:10:09,000 --> 00:10:12,000
And here you can probably see everything as such.

192
00:10:12,000 --> 00:10:12,000
Right.

193
00:10:13,000 --> 00:10:21,000
Um, so I hope uh, you were able to understand this deployment technique, uh, one more, uh, deployment

194
00:10:21,000 --> 00:10:27,000
mechanism that I would definitely like to show is from hugging Face, which is nothing but this specific

195
00:10:27,000 --> 00:10:28,000
spaces.

196
00:10:28,000 --> 00:10:32,000
Okay, so I will show you how you can go ahead and create your own space.

197
00:10:32,000 --> 00:10:36,000
Now space, uh, hugging face space is something very amazing.

198
00:10:36,000 --> 00:10:37,000
Hugging face.

199
00:10:37,000 --> 00:10:39,000
It provides some amount of face with respect.

200
00:10:39,000 --> 00:10:45,000
Uh, some amount of space or deployment, uh, server for you all so that you will be able to deploy

201
00:10:45,000 --> 00:10:52,000
your entire Application, and you'll be able to use it completely over here and deploy with the URL

202
00:10:52,000 --> 00:10:52,000
itself.

203
00:10:52,000 --> 00:10:53,000
Right.

204
00:10:53,000 --> 00:10:55,000
So let's say there are so many spaces over here.

205
00:10:55,000 --> 00:10:57,000
If I go ahead and click on any one of them, right.

206
00:10:57,000 --> 00:11:00,000
Let's say I will go ahead and click on this.

207
00:11:00,000 --> 00:11:04,000
Open a leaderboard instead of using a leaderboard.

208
00:11:04,000 --> 00:11:07,000
Let's see right now everything is running on zero.

209
00:11:07,000 --> 00:11:10,000
So if I just go ahead and click this right.

210
00:11:10,000 --> 00:11:13,000
So here you can see ID documentation recognition.

211
00:11:13,000 --> 00:11:16,000
You can drop this particular image over here right like this.

212
00:11:16,000 --> 00:11:19,000
And I can probably go ahead and click on Check Document Details.

213
00:11:19,000 --> 00:11:21,000
And I will be able to get all the information.

214
00:11:21,000 --> 00:11:25,000
So this entire deployment is specifically happening in the hugging face space itself.

215
00:11:25,000 --> 00:11:26,000
Right.

216
00:11:26,000 --> 00:11:32,000
So similarly what I will do is that I will take this entire application and deploy it over there itself,

217
00:11:32,000 --> 00:11:36,000
and let's see what exactly we'll be able to get it or not Okay.

218
00:11:36,000 --> 00:11:42,000
But again, if I talk about hugging face spaces, uh, you can read more about it.

219
00:11:42,000 --> 00:11:45,000
Hugging face spaces.

220
00:11:45,000 --> 00:11:50,000
Okay, so here you will be able to discover and many people usually upload this.

221
00:11:50,000 --> 00:11:50,000
Right.

222
00:11:50,000 --> 00:11:54,000
And you'll also be able to deploy your entire application.

223
00:11:54,000 --> 00:11:56,000
So that is what we are going to see in the next video.

224
00:11:56,000 --> 00:11:59,000
So I hope you like this particular video with respect to the deployment.

225
00:11:59,000 --> 00:12:00,000
I will see you all in the next video.

226
00:12:00,000 --> 00:12:01,000
Thank you.

227
00:12:01,000 --> 00:12:01,000
Take care.

228
00:12:01,000 --> 00:12:01,000
Have a great day.

