ChatPDF is a Python-based tool that enables users to interact with PDF documents through natural language queries. By leveraging Retrieval-Augmented Generation (RAG) techniques, it facilitates question-and-answer sessions within PDF files.
- Pose questions directly related to the content of PDF documents.
- Utilizes RAG architecture for accurate and context-aware responses.
- Designed for local execution, ensuring data privacy and control.
- Python 3.10
- Required Python packages (to be specified in
requirements.txt)
-
Clone the repository:
git clone https://github.com/git-devisha/ChatPDF.git cd ChatPDF -
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
**Install the required dependencies:**
pip install -r requirements.txt
-
Set up environment variables:
Create a
.envfile in the project root directory and add necessary environment variables.# .env # Example: # API_KEY=your_api_key_here
To start interacting with your PDF documents:
python chatpdf.pyFollow the on-screen prompts to upload a PDF and begin your Q&A session.
ChatPDF/
├── .devcontainer/ # Development container configurations
├── chat_pdf.py # Core script for PDF interaction
├── chatpdf.py # Alternative or additional script
├── chatpdf.env # Environment variable definitions
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Contributions are welcome! If you have suggestions or improvements, feel free to fork the repository and submit a pull request.