This project implements a PDF-based Question and Answer system using LangChain, Hugging Face, and ChromaDB.
- Load multiple PDF files
- Extract and process text from PDFs
- Create embeddings using Hugging Face models
- Interactive Q&A interface with conversational AI
- Python 3.8+
- Hugging Face API token
- LangChain API key
- Clone the repository:
git clone <repository-url>
cd PDF-QnA
- Create and activate virtual environment:
python -m venv env
source env/bin/activate # Linux/Mac
env\Scripts\activate # Windows
- Install dependencies:
pip install langchain langchain_huggingface langchain_chroma pypdf
- Place your PDF files in the
data
directory - Set up your environment variables when prompted:
- LangChain API key
- Hugging Face API token
Run the main script:
python main.py
- Enter your API credentials when prompted