How sanjay-sahoo-0804/legal-ease-ai works
Legal-Ease AI is a document-grounded question-answering app: users upload PDFs for indexing, then ask questions and receive answers with retrieved context. The frontend calls a FastAPI backend, which orchestrates PDF preprocessing, vector storage and retrieval, and local language-model generation. A separate script demonstrates QLoRA fine-tuning. The README is empty, so the map relies on the sampled source; fine-tuning is shown as a separate capability, not as part of the serving workflow.
Main entry points: app.py FastAPI endpoints · vector_store.py Vector store access · config.py Answer generation · main.py Streamlit dashboard
Components 13
User interface
- Streamlit dashboard
frontend/main.py
API orchestration
- FastAPI endpoints
backend/app.py
Document ingestion
- PDF extraction
data_pipeline/preprocess.py - Text cleaning
data_pipeline/preprocess.py - Text chunking
data_pipeline/preprocess.py
Retrieval and generation
- Vector store access
backend/vector_store.py - Persistent ChromaDB
backend/vector_store.py - Answer generation
backend/config.py - Qwen model
backend/config.py
Model fine-tuning
- QLoRA training
data_pipeline/finetune.py
Other components
- User
- Hugging Face models
- Saved adapter weights
Connections 15
- User → Streamlit dashboard: uploads and asks
- Streamlit dashboard → FastAPI endpoints: sends API requests
- FastAPI endpoints → Streamlit dashboard: returns answers
- FastAPI endpoints → PDF extraction: calls extraction
- FastAPI endpoints → Text cleaning: calls cleaning
- FastAPI endpoints → Text chunking: calls chunking
- FastAPI endpoints → Vector store access: stores chunks
- FastAPI endpoints → Vector store access: requests retrieval
- Vector store access → Persistent ChromaDB: adds and queries
- Persistent ChromaDB → Vector store access: returns matches
- FastAPI endpoints → Answer generation: requests answer
- Answer generation → FastAPI endpoints: returns answer
- Answer generation → Qwen model: runs inference
- QLoRA training → Hugging Face models: loads base model
- QLoRA training → Saved adapter weights: saves adapters