Skip to content

Jaya400/Document_Q-A

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“„ Document Q&A Web App using Streamlit + Gemini Flash 2.0 + ChromaDB

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

๐ŸŒŸ Features

  • โœ… 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 .env file
  • ๐ŸŽฏ Easy deployment with Streamlit

๐Ÿงฐ Tech Stack

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

๐Ÿ“‚ Folder Structure

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages