Skip to content

Intel OneAPI hackthon prototype #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8bf2bd9
Update README.md
bhaskarturkar Nov 10, 2023
c3cc4f9
Update README.md
bhaskarturkar Nov 10, 2023
0f47718
Update README.md
bhaskarturkar Nov 10, 2023
7b3a2bc
Update README.md
bhaskarturkar Nov 10, 2023
6207bda
Update README.md
bhaskarturkar Nov 10, 2023
8deefaf
Add files via upload
bhaskarturkar Nov 10, 2023
70b43b9
Update README.md
bhaskarturkar Nov 10, 2023
bcdfecf
Add files via upload
bhaskarturkar Dec 6, 2023
9f7e3df
Add files via upload
bhaskarturkar Dec 6, 2023
4961f29
Add files via upload
bhaskarturkar Dec 6, 2023
742dfc8
Update requirements.txt removed unnecessary modules.
bhaskarturkar Dec 6, 2023
d0cbb74
Update README.md
bhaskarturkar Dec 6, 2023
f65de9d
Update README.md
bhaskarturkar Dec 6, 2023
524de4d
Update requirements.txt added some modules
bhaskarturkar Dec 6, 2023
91f9025
Add files via upload
bhaskarturkar Dec 6, 2023
d065765
Update README.md
bhaskarturkar Dec 6, 2023
abeab60
Update README.md
bhaskarturkar Dec 6, 2023
b3bfc62
Update README.md
bhaskarturkar Dec 6, 2023
9380c6d
Update README.md
bhaskarturkar Dec 6, 2023
934d4f0
Update README.md
bhaskarturkar Dec 6, 2023
bfdbee2
Update README.md added video link
bhaskarturkar Dec 6, 2023
a4c23e2
Update README.md
bhaskarturkar Dec 6, 2023
5664659
Update README.md
bhaskarturkar Dec 6, 2023
22cbbd8
Update README.md
bhaskarturkar Dec 6, 2023
f7116d2
Update README.md
bhaskarturkar Dec 6, 2023
76aa7cc
Update README.md
bhaskarturkar Dec 6, 2023
89a716e
Update README.md
bhaskarturkar Dec 6, 2023
e82853d
Update README.md
bhaskarturkar Dec 6, 2023
5d237d6
Update README.md
bhaskarturkar Dec 6, 2023
3cedd1f
Update compare_doc.py final
bhaskarturkar Dec 16, 2023
0418140
Update entity.py
bhaskarturkar Dec 16, 2023
799dd06
Update entity.py
bhaskarturkar Dec 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions Homepage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import streamlit as st
from PIL import Image

img = Image.open("images/affine.jpg")

page_config = {"page_title":"Contract_comparison_tool.io","page_icon":img,"layout":"wide"}

st.set_page_config(**page_config)

## Divide the user interface into two parts: column 1 (small) and column 2 (large).
#"""This code assigns the st.columns([1, 8]) statement to the variables col1 and col2,
#which divide the user interface into two columns. Column 1 will be smaller in width,
# while column 2 will be larger.
#"""

hide_streamlit_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
</style>
"""
st.markdown(hide_streamlit_style, unsafe_allow_html=True)

col1, col2,col3,col4 = st.columns([2.5,2.5,8.5,0.5])
with col1:
st.write(' ')
with col2:
#img = Image.open("images/affine.jpg")
st.image(img,width = 130)

with col3:
st.markdown("""
<h2 style='font-size: 55px; font-family: Arial, sans-serif;
letter-spacing: 2px; text-decoration: none;'>
<span style='background: linear-gradient(45deg, #ed4965, #c05aaf);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: none;'>
Contract Comparator
</span>
""", unsafe_allow_html=True)
with col4:
st.write(' ')

st.write("\n")
st.write("\n")
st.write("\n")
st.write("\n")
st.write("\n")
st.write("\n")
st.write("**It is a tool that can compare two different versions of the same contract and mention all the major changes that were made between the two documents .**")


# key=col1._text_input()
# Left column: Upload PDF text
# st.header("Dashboard")



# Extract the text from uploaded pdf
101 changes: 77 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,85 @@
# oneAPI-GenAI-Hackathon-2023 - Hack2Skill
#### Team Name - Team Affine
#### Problem Statement - Generative AI Large Language Models Fine Tuned For Legal Practice Platform
#### Team Leader Email - [email protected]

Welcome to the official repository for the oneAPI-GenAI-Hackathon-2023 organized by Hack2Skill!

## Getting Started

To get started with the oneAPI-GenAI-Hackathon-2023 repository, follow these steps:

### Submission Instruction:
1. Fork this repository
2. Create a folder with your Team Name
3. Upload all the code and necessary files in the created folder
4. Upload a **README.md** file in your folder with the below mentioned informations.
5. Generate a Pull Request with your Team Name. (Example: submission-XYZ_team)

### README.md must consist of the following information:
### A Brief of the Prototype:

#### Team Name -
#### Problem Statement -
#### Team Leader Email -
![Image](https://github.com/bhaskarturkar/oneAPI-GenAI-Hackathon-2023/blob/main/process-flow-diagram.JPG)

### A Brief of the Prototype:
This section must include UML Diagrams and prototype description

### Tech Stack:
List Down all technologies used to Build the prototype
Technologies used (Mark down oneAPI AI Analytics libraries used) <br>
1.Python <br>
2.Hugging Face <br>
3.ChromaDB <br>
4.Langchain <br>
5.Open-docx <br>
6.PyPDF <br>
7.Pytorch <br>

8.Intel OpenDNN <br>
9.Intel OneAPI Base Toolkit <br>


### Step-by-Step Code Execution Instructions:
This Section must contain a set of instructions required to clone and run the prototype so that it can be tested and deeply analyzed


#### Getting Started
These instructions will guide you through setting up your environment and running the project.

#### Prerequisites
1.An IDC compute instance <br>
2.SSH access to the instance <br>
3.Miniconda (instructions included for installation) <br>
#### Installation and Setup
1. SSH into the IDC Compute Instance
To start, SSH into your IDC compute instance. Replace <YourInstanceIP> with your actual instance IP address.
```
ssh username@<YourInstanceIP>
```
2. Install Miniconda
Once logged in, install Miniconda for a simplified Python environment management. Run the following:
```
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
```
Follow the on-screen instructions to complete the installation.

3. Create and Activate a Conda Environment
Create a new Conda environment with Python version 3.10.6:

```
conda create -n myenv python=3.10.6
conda activate myenv
```
This will create and activate a new environment named myenv.

4. Install Required Modules
Install the required modules specified in requirements.txt:
```
pip install -r requirements.txt
```
Ensure requirements.txt is present in your current directory.

5. Accessing Streamlit UI and Port Forwarding
To access the Streamlit UI, use SSH tunneling for port forwarding. Run the following command on your local machine:
```
streamlit run Homepage.py
```
```
ssh -L 8501:localhost:8501 username@<YourInstanceIP>
```
Then, you can access the Streamlit UI by navigating to localhost:8501 in your web browser.

#### Working demo
[Working demo of contract comparator](https://vimeo.com/891854466)

Contributing
Guidelines for contributing to this repository, if applicable.



Note: Replace placeholders (like <YourInstanceIP>) with actual values relevant to your project.


### Future Scope:
Write about the scalability and futuristic aspects of the prototype developed
A Fine tuning a bigger model using proper relevant dataset may improve the results.
Binary file added data/Contracts/MSA v1.pdf
Binary file not shown.
Binary file added data/Contracts/MSA v2_1.pdf
Binary file not shown.
Binary file added images/affine.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading