Skip to content

Manaskhurana/Python-Multiple-PDF-Chat-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ Chat with Multiple PDFs

Chat with your PDFs using AI! A Streamlit-based chatbot that allows you to upload multiple PDF files and ask questions interactively. Built with LangChain, OpenAI embeddings, and FAISS vector store for efficient document retrieval.

🎯 Features

Upload multiple PDFs at once.

Extracts and processes text from PDFs automatically.

Splits text into chunks for better semantic search.

Conversational retrieval using OpenAI LLMs.

Memory keeps track of chat history for a natural conversation.

Clean, responsive interface with Streamlit.

πŸ›  Installation

Clone the repository:

git clone https://github.com/Manaskhurana/Python-Multiple-PDF-Chat-Bot.git cd chat-with-pdfs

Create a virtual environment (recommended):

python -m venv venv

Activate the virtual environment:

Windows:

venv\Scripts\activate

Mac/Linux:

source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Create a .env file in the project root and add your OpenAI API key:

OPENAI_API_KEY=your_openai_api_key_here

πŸš€ Running the App

Start the Streamlit app:

streamlit run app.py

Open your browser at http://localhost:8501 .

Usage Steps:

  1. Upload one or more PDFs in the sidebar.
  2. Click "Process" to extract and embed text.
  3. Ask questions in the chat box and get instant AI responses.
  4. Continue the conversation; chat history is preserved.

πŸ—‚ Project Structure chat-with-pdfs/ β”œβ”€ app.py # Main Streamlit app β”œβ”€ htmlTemplates.py # Custom HTML templates for chat messages β”œβ”€ requirements.txt # Python dependencies β”œβ”€ .env # OpenAI API key (ignored by Git) β”œβ”€ venv/ # Virtual environment (ignored by Git) └─ README.md

βš™ Dependencies

Python 3.13+

Streamlit

PyPDF2

LangChain

OpenAI

Install all dependencies via:

pip install -r requirements.txt

πŸ“ Notes

  • .env and venv/ are included in .gitignore to keep sensitive data and virtual environment out of Git.
  • Best run locally, but can also deploy on Streamlit Cloud or other hosting platforms.

πŸ“œ License

MIT License Β© 2025 Manas Khurana

βœ… This README is professional, fully formatted, all commands and code blocks are ready for GitHub copy buttons, includes demo video section, screenshots, and step-by-step instructions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages