Welcome to the PDF Chat App! This web application allows you to chat with a chatbot powered by the OpenAI language model. It is designed to extract text from uploaded PDF files and answer your questions based on the content of the PDF.
This app is an LLM (Large Language Model)-powered chatbot built using the following technologies:
-
Streamlit: A Python library that simplifies the process of creating web applications, ensuring a seamless and user-friendly experience.
-
LangChain: LangChain provides the natural language processing capabilities that empower the chatbot to understand and generate human-like text.
-
OpenAI LLM Model: The app harnesses the power of the OpenAI Large Language Model to provide accurate and context-aware responses in natural language.
Follow these steps to set up the PDF Chat App on your local machine:
- Python: Make sure you have Python installed on your system. You can download it from python.org.
-
Clone this repository to your local machine.
git clone https://github.com/yourusername/pdf-chat-app.git
-
Create a virtual environment (optional but recommended) for the project. You can use venv or virtualenv.
python -m venv venv
-
Activate the virtual environment:
venv\Scripts\activate
-
Install the required Python libraries from the requirements.txt file.
pip install -r requirements.txt
-
Create a .env file in the project directory to store your OpenAI API key. OPENAI_API_KEY=your-api-key-here
-
Run the PDF Chat App using Streamlit.
streamlit run app.py
-
The app should now be running locally. You can access it in your web browser at http://localhost:XXXX.
- Upload a PDF file by clicking the "Upload your PDF" button.
- Wait for the app to process the PDF and create a searchable index.
- Enter your questions about the PDF in the text input field.
- The app will provide answers based on the content of the PDF.
If you'd like to contribute to this project, please open an issue and discuss your ideas or create a pull request with your proposed changes.
If you have any questions, suggestions, or just want to connect, you can reach me on:
Happy coding and keep practicing!