The purpose of this repository is to provide a Python Streamlit app that interacts with online PDF documents using a QA mechanism. The application leverages various custom modules from the LangChain library, GPT-3 models, and other resources to perform this task.
The main functions of this application are:
- Load PDF document from a given online link.
- Split the loaded PDF into manageable parts.
- Generate embeddings using OpenAI's technology.
- Implement a QA retrieval chain.
- Engage in a conversation with the user and generate responses from the application based on the context of the PDF document.
Before you proceed, make sure you have Python 3.7 or higher installed.
-
Clone the repository
git clone https://github.com/yourusername/reponame.git
-
Change directory into the cloned repository
cd reponame
-
Install the necessary dependencies
pip install -r requirements.txt
The entry point of the application is the Python file.
To run the application, use the command:
streamlit run yourpythonfile.py
Replace yourpythonfile.py
with the actual name of your Python file.
Then go to your browser and enter the address that Streamlit gives you, and you should see the LangChain application running.
In the sidebar, you will be asked to enter your OpenAI API Key and the address of your online PDF. After adding these details, the application will be ready to use. You can ask any question, and the application will try to answer it using the context from the PDF document.
Please note that this script uses the OpenAI's GPT-3 model which is a paid service. You need to have an OpenAI account and the corresponding API key.
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.
This project is MIT licensed.