This is a Streamlit-based RAG (Retrieval-Augmented Generation) chatbot that allows users to upload documents and chat with them using Google Gemini models and LangChain.
Users can:
- Upload different document types
- Ask questions from the document
- Save chat history
- Continue previous chats with the same document
- 📂 Upload multiple file formats:
- DOCX
- TXT
- CSV
- PPT / PPTX
- Images (PNG, JPG, JPEG) with OCR using Gemini Vision
- 💬 Chat with document using RAG
- 🧠 Uses vector database (Chroma)
- 🕒 Chat history with separate folders per chat
- 🔁 Continue previous chats
- 🎨 Professional Streamlit UI
project_folder/
│
├── app.py # Streamlit UI
├── rag_engine.py # Document processing and RAG logic
├── utils.py # Chat history save/load utilities
├── chat_history/ # Auto-created chat folders
├── .env # API keys
└── README.md
- Python 3.9+
- Google Gemini API Key
## 🛠️ Installation
Install the required packages:
```bash
pip install streamlit langchain chromadb python-dotenv langchain-google-genai unstructured- Create a
.envfile in the project root:
GOOGLE_API_KEY=your_api_key_here- Set the embedding model in
config.py(if used):
EMBEDDING_MODEL = "models/embedding-001"Run this command in your project folder:
streamlit run app.pyThen open this link in your browser: