This project harnesses the power of the Gemini API to enable conversational interactions with PDF documents. By integrating Gemini API key, users can engage in chat-based queries and receive detailed responses directly from their uploaded PDFs. It streamlines the process of extracting information from multiple PDFs and facilitates seamless communication with the documents' contents.
To install the necessary dependencies, run:
pip install -r requirements.txt
- Upload your PDF files.
- Ask questions related to the uploaded PDFs.
- Receive detailed responses based on the content of the PDF documents.
- get_pdf_text(pdf_docs): Extracts all text from the uploaded PDFs, akin to a comprehensive highlighter.
- get_text_chunks(text): Divides the extracted text into smaller, more manageable segments.
- get_vector_store(text_chunks): Converts the segmented text into a specialized code for computational understanding, resembling a secret language for text.
- get_conversational_chain(): Serves as the core engine, formulating queries to the computer based on the PDFs and retrieving elaborative answers.
- user_input(user_question): Translates user questions into the secret computer language, seeks answers from the document content using the core engine, and presents the responses in plain English.
- main(): Entry point for executing the program.
- Google Generative AI (Google Gemini API): Utilized for generating responses based on user queries and document content.
- Google Generative AI Embeddings: Used for generating embeddings (vector representations) of text chunks extracted from PDF documents.
- Streamlit: Facilitates the creation of interactive web applications for easy user interaction.
- langchain: Enables the conversion of text into a specialized code for computational understanding.
- FAISS Vector Database: Used for storing and retrieving vector representations of text chunks, enhancing computational efficiency.