Skip to content

Latest commit

 

History

History
65 lines (55 loc) · 1.42 KB

File metadata and controls

65 lines (55 loc) · 1.42 KB

PDF Chatbot

Overview

This project is an AI-powered PDF Question Answering system built using Google Gemini and LangChain. It allows users to upload multiple PDF files and ask questions based on their content. The system uses embeddings and vector search (FAISS) to retrieve relevant information and generate accurate answers.

Project Structure

PDF-Chatbot/ │ ├── app.py ├── requirements.txt ├── README.md ├── .gitignore ├── .env.example │ ├── faiss_index/ (ignored) │ ├── index.faiss │ └── index.pkl │ └── venv/ (ignored)

Models

  • Google Gemini (Chat Model)
  • Gemini Embeddings (models/gemini-embedding-001)
  • FAISS Vector Store for similarity search
  • Retrieval-Augmented Generation (RAG) architecture

Technologies Used

  • Python
  • Streamlit
  • LangChain
  • Google Generative AI (Gemini)
  • FAISS
  • PyPDF2
  • python-dotenv

How to Run the Project

  1. Install dependencies:
pip install -r requirements.txt
  1. Copy .env.example to .env:
copy .env.example .env
  1. Open the .env file and add your Google API key: GOOGLE_API_KEY="your_google_api_key_here"

  2. Run the Streamlit app:

streamlit run app.py

Output

The application allows users to:

  • Upload multiple PDF files
  • Process and embed the document text
  • Ask contextual questions
  • Receive accurate answers based on the uploaded PDFs

Author

Pranav Chauhan