This project is a Streamlit-based application that allows users to chat with and ask questions about the content of uploaded PDF files. It uses Google's Generative AI for text embedding and question answering.
- Upload multiple PDF files
- Process and index PDF content
- Ask questions about the uploaded PDFs
- Get AI-generated answers based on the PDF content
The project consists of three main Python files:
Main.py: The main Streamlit applicationcreate_chunks.py: Handles PDF text extraction and chunkingVector_store.py: Manages vector embeddings and storage
- Streamlit
- PyPDF2
- LangChain
- Google Generative AI
- FAISS
- python-dotenv
- Clone the repository
- Install the required packages:
pip install -r requirements.txt - Set up a
.envfile with your Google API key:GOOGLE_API_KEY=your_api_key_here
- Run the Streamlit app:
streamlit run Main.py - Use the sidebar to upload PDF files
- Click "Submit & Process" to index the PDFs
- Ask questions in the main text input field
- View AI-generated answers based on the PDF content
- PDFs are uploaded and processed into text chunks
- Text chunks are embedded and stored in a FAISS index
- User questions are embedded and compared to the stored vectors
- Relevant text chunks are retrieved and used to generate an answer
- The answer is displayed to the user