# Clone or download the project
cd legal-research-assistant
# Run the automated setup (recommended)
python setup.py
# OR Manual setup:
python -m venv venv
# Windows: venv\Scripts\activate
# macOS/Linux: source venv/bin/activate
pip install -r requirements.txt# Copy environment template
cp .env.example .env
# Edit .env and add your OpenAI API key
OPENAI_API_KEY=your_openai_api_key_here# Activate virtual environment if not already active
# Windows: venv\Scripts\activate
# macOS/Linux: source venv/bin/activate
# Start the application
streamlit run app.py- Open Browser: Navigate to
http://localhost:8501 - Upload Documents: Click "Browse files" and upload PDF, DOCX, or TXT legal documents
- Process Documents: Click "Process Documents" to index them
- Ask Questions: Enter legal questions in the query box
- Get Answers: Receive detailed analysis with citations and conflict detection
- "What are the termination clauses in the contract?"
- "What are the liability limitations?"
- "What intellectual property rights are mentioned?"
- "What are the payment terms and conditions?"
- "Are there any confidentiality obligations?"
- Multi-format Support: PDF, DOCX, TXT documents
- Semantic Search: AI-powered document retrieval
- Legal Citations: Proper section and clause references
- Conflict Detection: Identifies contradictory information
- Performance Metrics: Built-in evaluation and timing
- Export Results: Download analysis as JSON
Import Errors
pip install -r requirements.txtMissing API Key
# Check .env file exists and contains:
OPENAI_API_KEY=your_actual_api_keyPort Already in Use
streamlit run app.py --server.port 8502Memory Issues
- Reduce
CHUNK_SIZEin .env - Process fewer documents at once
- Restart the application
- 馃摉 Full Documentation: README.md
- 馃悰 Report Issues: GitHub Issues
- 馃挰 Discussions: GitHub Discussions
- Try Sample Documents: Use the included sample legal documents in
/data/sample_documents/ - Customize Settings: Modify configuration in
.envfile - Explore Advanced Features: Document comparison, section analysis
- Deploy: Use Streamlit Cloud or HuggingFace Spaces for sharing
Happy legal research! 鈿栵笍