A Streamlit-based AI application that allows users to upload PDF documents and ask questions about their content using Retrieval-Augmented Generation (RAG). The application extracts text from PDFs, generates embeddings, stores them in ChromaDB, retrieves relevant context, and uses the Groq LLM to answer user queries.
🔗 Try the App: https://chat-with-pdfsss.streamlit.app
- 📄 Upload one or multiple PDF documents
- ✂️ Extract text using PyMuPDF
- 🧩 Split documents into semantic chunks
- 🔍 Generate embeddings for efficient retrieval
- 🗄️ Store embeddings using ChromaDB
- 🤖 Ask natural language questions about uploaded PDFs
- ⚡ Generate AI-powered answers using Groq LLM
- 💻 Interactive and user-friendly Streamlit interface
| Technology | Purpose |
|---|---|
| Python | Programming Language |
| Streamlit | Web Application |
| ChromaDB | Vector Database |
| Sentence Transformers | Text Embeddings |
| Groq API | Large Language Model |
| PyMuPDF | PDF Text Extraction |
| python-dotenv | Environment Variables |
Chat-with-Pdfs/
│
├── app.py
├── requirements.txt
├── README.md
├── .gitignore
├── .env.example
│
├── src/
│ ├── embeddings.py
│ ├── ingestion.py
│ ├── qa.py
│ └── __init__.py
│
├── pdfs/
├── data/
└── logs/
git clone https://github.com/Krishna9616/Chat-with-Pdfs.git
cd Chat-with-Pdfspython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root.
Add your Groq API key:
GROQ_API_KEY=your_groq_api_keystreamlit run app.pyThe application will open automatically in your browser.
This project is deployed using Streamlit Community Cloud.
- Push the project to GitHub.
- Connect the repository to Streamlit Community Cloud.
- Set the Main file path as:
app.py
- Add your API key under App Settings → Secrets:
GROQ_API_KEY="your_groq_api_key"- User uploads one or more PDF documents.
- The application extracts text using PyMuPDF.
- The extracted text is divided into chunks.
- Sentence Transformer embeddings are generated.
- Embeddings are stored in ChromaDB.
- When a user asks a question:
- Similar chunks are retrieved.
- Retrieved context is sent to the Groq LLM.
- The AI generates an accurate answer.
Krishna
- GitHub: https://github.com/Krishna9616
- Project Repository: https://github.com/Krishna9616/Chat-with-Pdfs
- Live Demo: https://chat-with-pdfsss.streamlit.app


