An AI-powered legal research assistant that provides legal advisory, case outcome prediction, and report generation services.
- Legal Advisory: Get comprehensive legal advice based on uploaded documents
- Case Outcome Prediction: Predict likely case outcomes with probability assessments
- Legal Report Generation: Generate structured legal reports with key findings and recommendations
- Backend: FastAPI, LangChain, Groq API
- Frontend: Streamlit
- Document Processing: PyPDF2
- AI Model: Llama-3.1-8b-instant via Groq
- Python 3.8+
- Virtual environment (recommended)
- Clone the repository:
git clone https://github.com/Ranjith00005/LawLens.git
cd LawLens- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys- Start the backend server:
cd backend
uvicorn hybrid_main:app --host 0.0.0.0 --port 9001 --reload- Start the frontend (in a new terminal):
cd frontend
streamlit run app.py- Open your browser and navigate to the Streamlit URL (typically
http://localhost:8501)
- Upload one or more PDF legal documents
- Enter your legal query
- Select the desired service:
- Legal Advisory
- Legal Report Generation
- Case Outcome Prediction
- Click "Get Response" to receive AI-powered insights
GET /- Welcome messagePOST /legal-advisory/- Get legal advicePOST /case-outcome-prediction/- Predict case outcomesPOST /report-generator/- Generate legal reports
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for informational purposes only and does not constitute legal advice. Always consult with qualified legal professionals for actual legal matters.