1
00:00:04,900 --> 00:00:15,220
Okay, so in this level two application you are going to learn how to build a rack application using

2
00:00:15,220 --> 00:00:19,510
a Streamlit as your toy user interface.

3
00:00:19,510 --> 00:00:27,130
So what this application is doing is it is going to load one private document and it will allow the

4
00:00:27,130 --> 00:00:29,710
user to make questions about it.

5
00:00:29,710 --> 00:00:33,550
So now we are going to load a very simple document.

6
00:00:33,550 --> 00:00:41,260
But when this application is in a professional level you can load a 10,000 pages document or whatever

7
00:00:41,260 --> 00:00:41,680
you want.

8
00:00:41,710 --> 00:00:42,280
Right.

9
00:00:42,790 --> 00:00:45,550
So you are already familiar with the rack technique.

10
00:00:45,550 --> 00:00:47,080
You know how to do it.

11
00:00:47,080 --> 00:00:51,280
Now we are adding a user interface okay.

12
00:00:51,280 --> 00:00:53,020
So let's see how this work.

13
00:00:53,170 --> 00:01:00,880
You are already familiar with uh, how to, uh, drag and drop a file in Streamlit.

14
00:01:00,880 --> 00:01:05,349
In this case, the type of file is going to be a PDF file.

15
00:01:05,349 --> 00:01:05,770
Okay.

16
00:01:05,770 --> 00:01:14,500
So we click here and we are going to load this document which is talking about allergies to dogs and

17
00:01:14,500 --> 00:01:15,550
all that okay.

18
00:01:15,550 --> 00:01:25,330
So let's enter a question like uh for example we want to know what are the symptoms, uh, for a person

19
00:01:25,330 --> 00:01:28,120
that has uh, allergies to dogs okay.

20
00:01:28,120 --> 00:01:33,580
So what are the main symptoms?

21
00:01:36,300 --> 00:01:43,290
If I am allergic to my dog.

22
00:01:43,530 --> 00:01:44,130
Okay.

23
00:01:45,390 --> 00:01:49,680
We press enter and then here we enter.

24
00:01:50,860 --> 00:01:53,440
Our OpenAI API.

25
00:01:53,470 --> 00:01:53,950
He.

26
00:01:54,960 --> 00:02:01,530
We will press enter and then the application is going to generate the answer for us.

27
00:02:01,950 --> 00:02:06,330
The main symptoms for a dog allergy include sneezing and runny.

28
00:02:06,390 --> 00:02:07,140
Blah blah blah blah.

29
00:02:07,170 --> 00:02:07,770
Okay.

30
00:02:07,770 --> 00:02:08,789
So excellent.

31
00:02:08,789 --> 00:02:09,900
It's working.

32
00:02:09,930 --> 00:02:18,090
As you have seen in a very simple user interface, we have a running Rag application.

33
00:02:18,090 --> 00:02:20,340
Let's take a look at the code.

34
00:02:21,940 --> 00:02:27,970
As always, we have the two main files requirements and main.py.

35
00:02:28,000 --> 00:02:29,620
Requirements.txt.

36
00:02:30,250 --> 00:02:33,460
We have a little bit more packages here.

37
00:02:33,460 --> 00:02:37,480
You are already familiar with the packages here.

38
00:02:37,480 --> 00:02:44,650
You know chroma and database and you know a files etc..

39
00:02:44,650 --> 00:02:55,150
So these are a packages that you, uh, knew already from your experience with the level one applications.

40
00:02:55,150 --> 00:02:55,720
Okay.

41
00:02:55,720 --> 00:03:05,560
And if you go to the Main.py a file, you will see that most of the code also is code that you already

42
00:03:05,560 --> 00:03:10,360
know, but it has the Streamlit touch.

43
00:03:10,390 --> 00:03:11,050
Okay.

44
00:03:11,050 --> 00:03:20,770
So we have the, uh, functions encapsulating the long chain code, the Streamlit uh, format options,

45
00:03:20,770 --> 00:03:22,030
etc., etc..

46
00:03:22,150 --> 00:03:26,500
Okay, so now you know what to do.

47
00:03:26,530 --> 00:03:33,130
You download the code, you execute our code in your computer, and then you repeat the code and you

48
00:03:33,130 --> 00:03:39,700
experiment with it and whatever, uh, question you find doubt you have, you find problem, you find

49
00:03:39,700 --> 00:03:47,890
ChatGPT for extremely documentation, etc., etc., etc. experiment, make mistakes, learn from the

50
00:03:47,890 --> 00:03:48,430
mistakes.

51
00:03:48,430 --> 00:03:56,950
And once you feel comfortable with this, uh, application and only then you go to the next application.

