PDF Insight is an interactive chatbot application that allows users to upload PDF documents and engage in natural language conversations about their content. Leveraging the power of Streamlit, LangChain, and Google's Gemini AI, this project enables efficient document analysis and information retrieval.
- PDF Upload: Upload multiple PDF documents for analysis
- Natural Language Processing: Engage in conversations about document content using natural language
- AI-Powered Responses: Utilizes Google's Gemini AI for intelligent question answering
- Vector Search: Implements FAISS for efficient similarity search on document content
- User-Friendly Interface: Clean and intuitive chat-like interface built with Streamlit
To set up PDF Insight on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/AnkitXP/pdf-insight.git cd pdf-insight -
Install the required dependencies:
pip install -r requirements.txt
-
Set up your Google API key:
- Create a
.envfile in the project root - Add your Google API key:
GOOGLE_API_KEY=your_api_key_here
- Create a
To run the application:
-
Execute the following command:
streamlit run app.py
-
Open your web browser and navigate to the provided local URL (usually
http://localhost:8501) -
Upload one or more PDF documents using the sidebar
-
Start chatting with the AI about the content of your uploaded documents
- PDF Processing: The application extracts text from uploaded PDF documents
- Text Chunking: Extracted text is split into manageable chunks
- Embedding Generation: Text chunks are converted into vector embeddings
- Similarity Search: User queries are matched against the most relevant text chunks
- AI-Powered Responses: Google's Gemini AI generates responses based on the relevant context
- Streamlit: For the web interface
- LangChain: For building the conversational AI pipeline
- Google Generative AI: For natural language processing and response generation
- FAISS: For efficient similarity search
- PyPDF2: For PDF text extraction
Contributions to PDF Insight are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.