An AI Assistant that extracts content from Business contracts and provides Key points, segregates the content into Clauses and Sub clauses and when provided with a template shows deviations.
pip install -r requirements.txt
streamlit run New_Contract.py
Thank you for considering contributing to this project! To ensure smooth collaboration, please follow these guidelines when making changes or adding new features.
- Consistency: Maintain consistency with the existing code structure, documentation format, and naming conventions.
- Testing: Thoroughly test any new feature or fix before submitting. Ensure that existing features are not affected.
- Documentation: Update relevant sections in the documentation when adding or modifying functionality, including utility functions, dependencies, or UI pages.
- Fork the repository and create a new branch for your feature or fix.
- Make your changes. Ensure they adhere to the guidelines listed below.
- Test your changes. If applicable, write tests to validate the new functionality.
- Submit a Pull Request (PR). Make sure to clearly describe the changes, purpose, and any dependencies.
- Ensure that all dependencies are up-to-date and compatible with existing ones.
- If you introduce a new dependency, update the
# Dependencies
section in the documentation accordingly, including links to its documentation.
- When adding new utility functions, ensure they follow the same structure and naming conventions used in
rag.py
andutils.py
. - Place any utility functions related to extracting text, key points, clauses, or deviations in
utils.py
. - Clearly document the purpose and usage of any new functions in the relevant section of the code and in the
# Utility functions
section of the documentation.
- Home Page: If you modify
New_contract.py
, ensure that it still handles file uploads and integrates with existing helper functions for text extraction and vector store updates. - Additional Pages: All new pages must be added to the
Pages
folder. If the page involves querying the contract or template, ensure it correctly uses helper functions. - UI Components: Any new page should follow the structure of existing ones like
Clauses
,Key Points
, andDeviations
. Use appropriate helper functions (extract_clauses
,extract_keypoints
,find_deviations
) for their respective functionality.
- Clauses: New components should use the
extract_clauses
function. - Key Points: Ensure the UI integrates with the
extract_keypoints
function. - Deviations: Use the
find_deviations
function to maintain consistency with other pages.
- Follow Python best practices and the PEP 8 style guide.
- Keep functions modular and concise.
- Write clear and descriptive docstrings for all functions.
- Before submitting a PR, ensure that all code is tested.
- If applicable, create new test cases to cover the new features or bug fixes.
- Validate that existing functionality is not broken by running the full test suite.
- A descriptive title and summary of the changes.
- Reference any related issues or tasks in the PR description.
- Include a section on Testing explaining how you tested the new functionality.
- Ensure that the CI pipeline (if any) passes before submitting the PR for review.
By following these guidelines, you help maintain the quality and integrity of the project. Happy coding!