How vaibhavghugretkar/kairos works
Project type and purpose
• LexiClarus is a full-stack AI-powered legal-assistant web application.
• Purpose: Upload a PDF/DOCX contract, extract and simplify legal clauses, flag risks, and answer user questions via a web UI.
File structure
• Top-level files:
• main.py → FastAPI app entrypoint
• app.py → Streamlit frontend entrypoint
• agents.py → Defines the four modular “agents” (Extractor, Simplifier, Risk Identifier, QA Agent)
• download_model.py → Helper to fetch or cache local models
• requirements.txt → Python dependencies
• assets/ → Static images & screenshots used in README and UI
• No separate “frontend” or “backend” folders, but code clearly splits UI (app.py) and API (main.py).
README for architectural insights
• 4 modular agents running in a pipeline
• Backend built on FastAPI + Uvicorn
• Frontend built on Streamlit
• Core models:
• Flan-T5 (local, CPU)
• Fine-tuned Gemma (hosted on Hugging Face Space)
• Gemini 2.0 Flash (Google API with heuristic fallback)