Streamlit PDF Q&A App
This is a Streamlit web application that allows users to upload a PDF document and ask questions about its content. The application uses a Retrieval-Augmented Generation (RAG) pipeline built with LangChain to provide accurate, document-grounded answers.
Features
- PDF Upload: Upload any PDF file directly through the web interface.
- Intelligent Q&A: Ask questions about the content of the PDF.
- LangChain Integration: Utilizes LangChain for document loading, splitting, and the RAG pipeline.
- Streamlit UI: A simple and intuitive user interface built entirely with Python.
- OpenAI Embeddings: Converts document chunks into vectors for semantic search.
Technologies Used
- Streamlit: For the web application framework.
- LangChain: For building the LLM application pipeline.
- OpenAI: Provides the embedding and chat models (
gpt-5). - PyPDFLoader: For loading PDF documents.
How to Run the Application Locally
Clone the repository:
git clone [https://github.com/](https://github.com/)<bimal1023>/<langchain-pdf-chatbot>.git cd <langchain-pdf-chatbot>Install the required libraries:
pip install -r requirements.txtSet up your OpenAI API key: The application will prompt you for your key in the web UI. Alternatively, you can set it as an environment variable:
export OPENAI_API_KEY="your_api_key_here"Run the Streamlit app:
streamlit run app.pyThe application will open in your browser.
License
This project is licensed under the MIT License.
Built With
- langchain
- openai
- python
Log in or sign up for Devpost to join the conversation.