Skip to content

AnasNasim12/ChatWithPDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Chatbot

A Streamlit application that enables users to upload multiple PDF files and interact with the content through a conversational interface. It employs the Retrieval-Augmented Generation (RAG) algorithm via FAISS and Google's Generative Pre-trained Transformer for responsive and context-aware answers.

Features

  • Upload multiple PDF documents for processing.
  • Extract text from the PDF files using PyPDF2.
  • Split the text into manageable chunks for better context capturing.
  • Create a FAISS index of embeddings for efficient similarity search.
  • Utilize Google's Gemini LLM Model for generating responses to user queries.

image

Installation

  1. Clone this repository to your local environment.
  2. Ensure that you have Python installed on your machine.
  3. Install the necessary Python packages using:
pip install -r requirements.txt
  1. You must have a .env file containing your GOOGLE_API_KEY for the Gemini LLM Model.

Usage

  1. Start the Streamlit app:
streamlit run chatpdf.py
  1. Open the Streamlit application in your browser.
  2. Use the sidebar to upload PDF files by clicking on the "Upload your PDF Files" button.
  3. Once uploaded, click "Submit & Process" to index the content of the PDFs.
  4. After processing, ask a question in the text input field to get responses based on the PDF content.

Generative AI exploratory projects using Gemini

This repo also includes other simple projects that include utilization of the gemini-vision model, and a basic QnA system with a memory storage system.

Credits

  • Streamlit - For creating the web application.
  • PyPDF2 - For PDF text extraction.
  • LangChain - For text splitting and chaining logic.
  • FAISS - For efficient similarity search.
  • Google GenerativeAI - For embedding generation and conversational model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages