Skip to content

siddharth-shah-17/PDF-CHAT-PROJECT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ PDF Chatbot – Ask Questions About Any PDF

An interactive Streamlit application that lets you upload a PDF, embed its contents using OllamaEmbeddings, and ask context-aware questions using a conversational AI powered by phi.


πŸš€ Features

  • πŸ“ Upload and parse PDFs
  • πŸ”Ž Intelligent chunking of PDF content
  • 🧠 Embedding with OllamaEmbeddings (LLM: phi)
  • πŸ’Ύ Persistent Chroma vector store for fast retrieval
  • πŸ€– LLM-powered question answering using RetrievalQA
  • πŸ’¬ Stateful conversation with memory
  • πŸ–ΌοΈ Chat UI with streaming responses and typing animation
  • πŸ”§ Robust error handling and logging

🧱 Tech Stack

  • Python
  • Streamlit
  • LangChain
  • Ollama (local LLM server)
  • ChromaDB
  • PyPDFLoader

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/siddharth-coder8/PDF-CHAT-PROJECT
cd PDF-CHAT-PROJECT

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows use venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

βš™οΈ Requirements

  • Python 3.8+
  • Ollama running locally (tested with model phi)
  • Required ports open (http://localhost:11434 for Ollama)
  • PDFs to test with

πŸ“‚ Folder Structure

.
β”œβ”€β”€ files/           # Uploaded PDFs
β”œβ”€β”€ jj/              # Chroma vector store
β”œβ”€β”€ main.py          # Main Streamlit app
β”œβ”€β”€ requirements.txt
└── README.md

▢️ Usage

  1. Start the Ollama server:

    ollama run phi
  2. Run the app:

    streamlit run main.py
  3. Upload a PDF and start chatting!


πŸ› οΈ Troubleshooting

  • If you see connection errors:

    • Make sure Ollama is running at http://localhost:11434
    • Ensure the phi model is downloaded
  • Logs are printed to the terminal via logging

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages