This is a Python application that allows you to load a PDF and ask questions about it using natural language. The application uses a LLM to generate a response about your PDF. The LLM will not answer questions unrelated to the document. The application reads the PDF and splits the text into smaller chunks that can be then fed into a LLM. It uses OpenAI embeddings to create vector representations of the chunks. The application then finds the chunks that are semantically similar to the question that the user asked and feeds those chunks to the LLM to generate a response. Here is the Proof of Concept.
- tiktoken
- faiss-cpu
- langchain
- PyPDF2
- python-dotenv
- streamlit
This is make you understand how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- Clone the repo
git clone https://github.com/KalyanMurapaka45/DocGenius-Revolutionizing-PDFs-with-AI.git
- Install the required libraries
pip install -r requirements.txt
You will also need to add your OpenAI API key to the .env file.
- To use the application, run the
app.py
file with the streamlit CLI (after having installed streamlit):
streamlit run app.py
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!. Don't forget to star the project if you find it useful!
-
Fork the Project
-
Create your Feature Branch
-
Commit your Changes
-
Push to the Branch
-
Open a Pull Request
Distributed under the GNU General Public License v3.0. See LICENSE.txt
for more information.
We would like to express our gratitude to the open-source community for their invaluable inspiration and contributions. We also acknowledge the Python libraries used in this project and their respective contributors.