Skip to content

BogRyadom/pdf-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 PDF Chatbot

Chat with your PDF documents using AI — upload one or multiple files and ask questions in plain English.

Python Streamlit Groq License


What it does

Upload one or more PDF files and ask questions about their content. The app extracts text from the PDFs, sends it to a Groq-hosted LLaMA model as context, and answers strictly from the document — no hallucinations from outside knowledge.

  • Multi-PDF support — upload multiple files at once, all merged into one context
  • Chat history — model remembers last 10 messages in the conversation
  • Fast inference — Groq LLaMA 3.1 8B responds in under 2 seconds
  • Strict grounding — answers only from the document, not from training data

Quick Start

1. Clone and install

git clone https://github.com/YOUR_USERNAME/pdf-chatbot.git
cd pdf-chatbot

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

2. Set up environment

cp .env.example .env

.env:

GROQ_API_KEY=your_groq_key_here

Get a free key at console.groq.com.

3. Run

streamlit run app.py

Opens at http://localhost:8501.


Deploy to Streamlit Cloud (free)

  1. Push to GitHub
  2. Go to share.streamlit.io
  3. Connect your repo, add GROQ_API_KEY in Secrets
  4. Deploy

Tech Stack

Layer Technology
UI Streamlit
PDF parsing pypdf
LLM Groq API — LLaMA 3.1 8B Instant
Config python-dotenv

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages