ClarityQA is a Streamlit application that allows you to upload your PDF or text files and interact with them in natural language. It uses document chunking, vector embeddings, and a local LLM to retrieve and generate precise answers to your questions.
- 📤 Upload PDF or TXT documents
- 🧩 Automatic document chunking for efficient retrieval
- 🧠 Embedding & indexing using HuggingFace MiniLM
- 🤖 Local LLM powered by Ollama with the Mistral model
- 💬 Ask questions in natural language with contextual answers
- 🗑️ Clear session to remove vectors and reset the system
git clone https://github.com/your-username/ClarityQA.git
cd ClarityQApython -m venv venv
source venv/bin/activate # On Windows: venv\\Scripts\\activatepip install -r requirements.txtFollow the installation instructions at Ollama Docs.
Make sure the mistral model is available:
ollama pull mistralstreamlit run main.pyThen open the URL provided in the terminal (usually http://localhost:8501).
├── main.py # Streamlit app
├── requirements.txt # Python dependencies
├── modules/
│ ├── loader.py # PDF/TXT loader and splitter
│ ├── vector_store.py # Embedding & Chroma vector store logic
│ └── llm_chain.py # LLM chain with prompt
├── temp_docs/ # Temporary uploaded files (auto-created)
├── chroma_db/ # Persistent vector database (auto-created)
temp_docs/andchroma_db/are created automatically at runtime.
Click the “🗑️ End Session” button in the app to remove embeddings and reset the app state.
No need to manually delete folders — the app handles it.
Pull requests and feature suggestions are welcome!
