ContractSense is an advanced, AI-driven system designed to streamline contract analysis and task compliance checking. By leveraging the power of natural language processing and machine learning, ContractSense extracts key terms from complex contracts and evaluates tasks for compliance, saving time and reducing human error in contract management processes.
- Intelligent Contract Analysis: Automatically extract key conditions from uploaded DOCX files using state-of-the-art NLP techniques.
- Task Compliance Checking: Analyze tasks from CSV or Excel files against extracted contract conditions with high accuracy.
- User-Friendly Interface: Intuitive Gradio-based frontend for easy interaction and quick results.
- Detailed Compliance Reports: Get comprehensive analysis including compliance status, reasons for non-compliance, adjusted amounts, and applied multipliers.
- Exportable Results: Download analysis results in CSV format and extracted contract conditions in JSON for further use or record-keeping.
- Multi-Format Support: Process contracts in DOCX format and tasks in both CSV and Excel formats.
- Backend: FastAPI, LangChain, OpenAI GPT
- Frontend: Gradio
- File Processing: python-docx, pandas, chardet
- AI/ML: OpenAI API
- Data Handling: JSON, CSV
-
Clone the repository:
git clone https://github.com/your-username/contractsense.git cd contractsense -
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` -
Install the required packages:
pip install -r requirements.txt -
Set up your OpenAI API key:
- Create a
.envfile in the project root. - Add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Create a
-
Start the backend server:
python main.py -
In a new terminal, launch the Gradio interface:
python app.py -
Open the provided URL in your web browser to access the ContractSense interface.
-
Upload a contract file (DOCX format) to extract conditions.
-
Upload a tasks file (Excel format) to analyze compliance.
-
View the detailed results in the interface and download them for further analysis or reporting.
- Contracts: Microsoft Word documents (.docx)
- Tasks: CSV or Excel files with the following columns:
- "Task Description": A detailed description of the task
- "Amount": The cost associated with the task (numerical value)
We welcome contributions to ContractSense! If you have suggestions for improvements or encounter any issues, please feel free to:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
You can access and use ContractSense through our public interface:
ContractSense Demo
This interface allows you to upload contracts and task files, extract conditions, and analyze task compliance without needing to set up the project locally.
Please note:
- The public interface has usage limits to prevent abuse.
- For processing sensitive documents, we recommend setting up ContractSense in a secure, private environment.
- OpenAI for providing the powerful GPT models
- Gradio developers for making it easy to create ML web interfaces