Okay, so in this level two application you are going to learn how to build a rack application using
a Streamlit as your toy user interface.
So what this application is doing is it is going to load one private document and it will allow the
user to make questions about it.
So now we are going to load a very simple document.
But when this application is in a professional level you can load a 10,000 pages document or whatever
you want.
Right.
So you are already familiar with the rack technique.
You know how to do it.
Now we are adding a user interface okay.
So let's see how this work.
You are already familiar with uh, how to, uh, drag and drop a file in Streamlit.
In this case, the type of file is going to be a PDF file.
Okay.
So we click here and we are going to load this document which is talking about allergies to dogs and
all that okay.
So let's enter a question like uh for example we want to know what are the symptoms, uh, for a person
that has uh, allergies to dogs okay.
So what are the main symptoms?
If I am allergic to my dog.
Okay.
We press enter and then here we enter.
Our OpenAI API.
He.
We will press enter and then the application is going to generate the answer for us.
The main symptoms for a dog allergy include sneezing and runny.
Blah blah blah blah.
Okay.
So excellent.
It's working.
As you have seen in a very simple user interface, we have a running Rag application.
Let's take a look at the code.
As always, we have the two main files requirements and main.py.
Requirements.txt.
We have a little bit more packages here.
You are already familiar with the packages here.
You know chroma and database and you know a files etc..
So these are a packages that you, uh, knew already from your experience with the level one applications.
Okay.
And if you go to the Main.py a file, you will see that most of the code also is code that you already
know, but it has the Streamlit touch.
Okay.
So we have the, uh, functions encapsulating the long chain code, the Streamlit uh, format options,
etc., etc..
Okay, so now you know what to do.
You download the code, you execute our code in your computer, and then you repeat the code and you
experiment with it and whatever, uh, question you find doubt you have, you find problem, you find
ChatGPT for extremely documentation, etc., etc., etc. experiment, make mistakes, learn from the
mistakes.
And once you feel comfortable with this, uh, application and only then you go to the next application.