K2-k2/DocuGenie
0
๐งโโ๏ธ DocuGenie: AI-Powered Document Intelligence
DocuGenie is a professional-grade Retrieval-Augmented Generation (RAG) platform that allows users to have interactive, multi-lingual conversations with their documents. Built using Streamlit, LangChain, and Google Gemini 2.5 Flash-Lite, it transforms static files into dynamic knowledge bases.
๐ Overview
DocuGenie bridges the gap between raw data and actionable insights. By combining vector embeddings with state-of-the-art language models, the app can answer specific questions, summarize complex reports, and find exact page references within seconds.
๐ ๏ธ Key Features
- Multi-Format Support: Seamlessly process PDF, DOCX, PPTX, XLSX, TXT, and Markdown files.
- Multilingual Support: Communicate with your data in over 15 languages, including English, Hindi, Telugu, Spanish, and more.
- Smart Retrieval (RAG): Uses
ChromaDBandGoogle Generative AI Embeddingsto find the most relevant context before answering. - Contextual Accuracy: Provides specific source citations (page numbers) for its answers to ensure transparency.
- Usage Management: Built-in daily limits for uploads and messages to manage API costs and prevent abuse.
- Persistent UX: Features chat history management, downloadable transcripts, and suggested actions (Summarize, Key Takeaways, etc.).
๐ Deployment on Hugging Face Spaces
- SDK: Select Streamlit.
- Secret Keys: Navigate to Settings > Variables and Secrets*.
- Add
GOOGLE_API_KEY_N2with your Google Gemini API Key. - Requirements: Your
requirements.txtshould include:
streamlit
langchain-google-genai
langchain-community
langchain-chroma
unstructured[all-docs]
chromadb
pypdf๐๏ธ Technical Architecture
- Orchestration: LangChain (Chains & Document Loaders)
- Vector Database: ChromaDB (Local persistent storage)
- LLM: Google Gemini 2.5 Flash-Lite (Optimized for speed and efficiency)
- Embeddings: Google
gemini-embedding-001 - UI/UX: Custom CSS-injected Streamlit components
๐ป Local Setup
# 1. Clone the repository
git clone <your-repo-url>
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set Environment Variable
export GOOGLE_API_KEY_N2="your_api_key_here"
# 4. Run the app
streamlit run app.pyDeveloped with โค๏ธ by Kesar Agarwal
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
