An intelligent document question-answering web application built with Streamlit, Google Gemini Flash 2.0, and ChromaDB. This tool allows users to upload documents (PDF, DOCX, TXT), ask questions in natural language, and receive context-aware answers instantly.
Ideal for:
- Students and researchers for academic papers
- HR and legal teams analyzing resumes and contracts
- Business users extracting insights from reports
- โ Drag-and-drop file upload interface
- ๐ Support for PDF, DOCX, and TXT files (up to 200MB)
- ๐ Text extraction and vector embedding
- ๐ค Natural Language Q&A powered by Google Gemini Flash 2.0
- โก Fast and accurate context-aware answers
- ๐ง Embedding and retrieval using ChromaDB
- ๐ก๏ธ API key security using
.envfile - ๐ฏ Easy deployment with Streamlit
| Component | Purpose |
|---|---|
| Streamlit | UI framework for building the web interface |
| Gemini Flash 2.0 | Googleโs generative AI for Q&A |
| ChromaDB | Vector store to store & search embeddings |
| PyPDF2 | Extract text from PDF files |
| python-docx | Extract text from DOCX files |
| google-generativeai | Gemini Flash API integration |
| dotenv | Load API keys from .env file securely |
Document_QA_App/ โ โโโ app.py # Main Streamlit application โโโ requirements.txt # Python dependencies โโโ .env # (Optional) Environment variables (API key)
Run the app
streamlit run app.py
๐งช How It Works Upload a document (PDF, DOCX, TXT).
The app extracts and chunks the text.
Chunks are converted to embeddings and stored in ChromaDB.
Ask a question via text box.
Relevant document chunks are retrieved.
Gemini Flash 2.0 generates an answer using the context.
Answer is displayed in real-time.
๐งพ Example Use Case Document: Resume.pdf
Question: "List the projects mentioned in this document"
Answer: "Developed Smart Waste Bin using IoT and a Personal Fitness Tracker using Machine Learning."
๐ฆ requirements.txt txt Copy Edit streamlit PyPDF2 python-docx chromadb google-generativeai python-dotenv
๐ Deployment Options You can deploy this app using:
Streamlit Cloud
Hugging Face Spaces
Docker (coming soon)
๐ฎ Future Enhancements Multiple file uploads
Save Q&A history to database (SQLite/Firebase)
Support for Excel (XLSX), PowerPoint (PPTX)
Voice-based question input
Custom UI components with Streamlit plugins
Language translation and multilingual support
๐ฉโ๐ป Author Developed by Jayalakshmi For academic, business, and document AI applications.