os1187 marshmellow77 commited on
Commit
92e28a8
0 Parent(s):

Duplicate from marshmellow77/contract-review

Browse files

Co-authored-by: Heiko Hotz <[email protected]>

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
.idea/aws.xml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="accountSettings">
4
+ <option name="activeProfile" value="profile:default" />
5
+ <option name="activeRegion" value="eu-west-1" />
6
+ <option name="recentlyUsedProfiles">
7
+ <list>
8
+ <option value="profile:default" />
9
+ </list>
10
+ </option>
11
+ <option name="recentlyUsedRegions">
12
+ <list>
13
+ <option value="eu-west-1" />
14
+ </list>
15
+ </option>
16
+ </component>
17
+ </project>
.idea/contract-review.iml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
.idea/inspectionProfiles/Project_Default.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
5
+ <option name="processCode" value="true" />
6
+ <option name="processLiterals" value="true" />
7
+ <option name="processComments" value="true" />
8
+ </inspection_tool>
9
+ </profile>
10
+ </component>
.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/contract-review.iml" filepath="$PROJECT_DIR$/.idea/contract-review.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
.idea/workspace.xml ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="067c010f-eb2e-4b7a-8be0-1cab8ed0c590" name="Default Changelist" comment="added upload for txt files" />
5
+ <option name="SHOW_DIALOG" value="false" />
6
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
7
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
8
+ <option name="LAST_RESOLUTION" value="IGNORE" />
9
+ </component>
10
+ <component name="Git.Settings">
11
+ <option name="PREVIEW_PUSH_PROTECTED_ONLY" value="true" />
12
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
13
+ </component>
14
+ <component name="ProjectId" id="225h9sLKMLSVygWHGz3NHAz8SyU" />
15
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
16
+ <component name="ProjectViewState">
17
+ <option name="hideEmptyMiddlePackages" value="true" />
18
+ <option name="showLibraryContents" value="true" />
19
+ </component>
20
+ <component name="PropertiesComponent">
21
+ <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
22
+ <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
23
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
24
+ <property name="settings.editor.selected.configurable" value="preferences.fileTypes" />
25
+ </component>
26
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
27
+ <component name="TaskManager">
28
+ <task active="true" id="Default" summary="Default task">
29
+ <changelist id="067c010f-eb2e-4b7a-8be0-1cab8ed0c590" name="Default Changelist" comment="" />
30
+ <created>1639133207850</created>
31
+ <option name="number" value="Default" />
32
+ <option name="presentableId" value="Default" />
33
+ <updated>1639133207850</updated>
34
+ </task>
35
+ <task id="LOCAL-00001" summary="initial commit">
36
+ <created>1639133769849</created>
37
+ <option name="number" value="00001" />
38
+ <option name="presentableId" value="LOCAL-00001" />
39
+ <option name="project" value="LOCAL" />
40
+ <updated>1639133769849</updated>
41
+ </task>
42
+ <task id="LOCAL-00002" summary="initial commit">
43
+ <created>1639135165622</created>
44
+ <option name="number" value="00002" />
45
+ <option name="presentableId" value="LOCAL-00002" />
46
+ <option name="project" value="LOCAL" />
47
+ <updated>1639135165622</updated>
48
+ </task>
49
+ <task id="LOCAL-00003" summary="initial commit">
50
+ <created>1639135355390</created>
51
+ <option name="number" value="00003" />
52
+ <option name="presentableId" value="LOCAL-00003" />
53
+ <option name="project" value="LOCAL" />
54
+ <updated>1639135355390</updated>
55
+ </task>
56
+ <task id="LOCAL-00004" summary="initial commit">
57
+ <created>1639135485531</created>
58
+ <option name="number" value="00004" />
59
+ <option name="presentableId" value="LOCAL-00004" />
60
+ <option name="project" value="LOCAL" />
61
+ <updated>1639135485531</updated>
62
+ </task>
63
+ <task id="LOCAL-00005" summary="initial commit">
64
+ <created>1639135654613</created>
65
+ <option name="number" value="00005" />
66
+ <option name="presentableId" value="LOCAL-00005" />
67
+ <option name="project" value="LOCAL" />
68
+ <updated>1639135654613</updated>
69
+ </task>
70
+ <task id="LOCAL-00006" summary="initial commit">
71
+ <created>1639135696508</created>
72
+ <option name="number" value="00006" />
73
+ <option name="presentableId" value="LOCAL-00006" />
74
+ <option name="project" value="LOCAL" />
75
+ <updated>1639135696508</updated>
76
+ </task>
77
+ <task id="LOCAL-00007" summary="initial commit">
78
+ <created>1639144556837</created>
79
+ <option name="number" value="00007" />
80
+ <option name="presentableId" value="LOCAL-00007" />
81
+ <option name="project" value="LOCAL" />
82
+ <updated>1639144556837</updated>
83
+ </task>
84
+ <task id="LOCAL-00008" summary="initial commit">
85
+ <created>1639149852195</created>
86
+ <option name="number" value="00008" />
87
+ <option name="presentableId" value="LOCAL-00008" />
88
+ <option name="project" value="LOCAL" />
89
+ <updated>1639149852195</updated>
90
+ </task>
91
+ <task id="LOCAL-00009" summary="added upload for txt files">
92
+ <created>1639234930014</created>
93
+ <option name="number" value="00009" />
94
+ <option name="presentableId" value="LOCAL-00009" />
95
+ <option name="project" value="LOCAL" />
96
+ <updated>1639234930014</updated>
97
+ </task>
98
+ <task id="LOCAL-00010" summary="added upload for txt files">
99
+ <created>1639234962097</created>
100
+ <option name="number" value="00010" />
101
+ <option name="presentableId" value="LOCAL-00010" />
102
+ <option name="project" value="LOCAL" />
103
+ <updated>1639234962097</updated>
104
+ </task>
105
+ <task id="LOCAL-00011" summary="added upload for txt files">
106
+ <created>1639235178228</created>
107
+ <option name="number" value="00011" />
108
+ <option name="presentableId" value="LOCAL-00011" />
109
+ <option name="project" value="LOCAL" />
110
+ <updated>1639235178228</updated>
111
+ </task>
112
+ <task id="LOCAL-00012" summary="added upload for txt files">
113
+ <created>1639235218385</created>
114
+ <option name="number" value="00012" />
115
+ <option name="presentableId" value="LOCAL-00012" />
116
+ <option name="project" value="LOCAL" />
117
+ <updated>1639235218385</updated>
118
+ </task>
119
+ <task id="LOCAL-00013" summary="added upload for txt files">
120
+ <created>1639236012199</created>
121
+ <option name="number" value="00013" />
122
+ <option name="presentableId" value="LOCAL-00013" />
123
+ <option name="project" value="LOCAL" />
124
+ <updated>1639236012199</updated>
125
+ </task>
126
+ <option name="localTasksCounter" value="14" />
127
+ <servers />
128
+ </component>
129
+ <component name="Vcs.Log.Tabs.Properties">
130
+ <option name="TAB_STATES">
131
+ <map>
132
+ <entry key="MAIN">
133
+ <value>
134
+ <State />
135
+ </value>
136
+ </entry>
137
+ </map>
138
+ </option>
139
+ </component>
140
+ <component name="VcsContentAnnotationSettings">
141
+ <option name="myLimit" value="2678400000" />
142
+ </component>
143
+ <component name="VcsManagerConfiguration">
144
+ <MESSAGE value="initial commit" />
145
+ <MESSAGE value="added upload for txt files" />
146
+ <option name="LAST_COMMIT_MESSAGE" value="added upload for txt files" />
147
+ </component>
148
+ </project>
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Contract Review
3
+ emoji: 📜
4
+ colorFrom: purple
5
+ colorTo: red
6
+ sdk: streamlit
7
+ app_file: app.py
8
+ pinned: true
9
+ duplicated_from: marshmellow77/contract-review
10
+ ---
11
+
12
+ # Configuration
13
+
14
+ `title`: _string_
15
+ Display title for the Space
16
+
17
+ `emoji`: _string_
18
+ Space emoji (emoji-only character allowed)
19
+
20
+ `colorFrom`: _string_
21
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
22
+
23
+ `colorTo`: _string_
24
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
25
+
26
+ `sdk`: _string_
27
+ Can be either `gradio` or `streamlit`
28
+
29
+ `sdk_version` : _string_
30
+ Only applicable for `streamlit` SDK.
31
+ See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
32
+
33
+ `app_file`: _string_
34
+ Path to your main application file (which contains either `gradio` or `streamlit` Python code).
35
+ Path is relative to the root of the repository.
36
+
37
+ `pinned`: _boolean_
38
+ Whether the Space stays on top of your list.
app.py ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from predict import run_prediction
3
+ from io import StringIO
4
+ import json
5
+
6
+ st.set_page_config(layout="wide")
7
+ st.cache(show_spinner=False, persist=True)
8
+
9
+
10
+ def load_questions():
11
+ questions = []
12
+ with open('data/questions.txt') as f:
13
+ questions = f.readlines()
14
+
15
+ # questions = []
16
+ # for i, q in enumerate(data['data'][0]['paragraphs'][0]['qas']):
17
+ # question = data['data'][0]['paragraphs'][0]['qas'][i]['question']
18
+ # questions.append(question)
19
+ return questions
20
+
21
+
22
+ def load_questions_short():
23
+ questions_short = []
24
+ with open('data/questions_short.txt') as f:
25
+ questions_short = f.readlines()
26
+
27
+ # questions = []
28
+ # for i, q in enumerate(data['data'][0]['paragraphs'][0]['qas']):
29
+ # question = data['data'][0]['paragraphs'][0]['qas'][i]['question']
30
+ # questions.append(question)
31
+ return questions_short
32
+
33
+
34
+ st.cache(show_spinner=False, persist=True)
35
+
36
+
37
+ def load_contracts():
38
+ with open('data/test.json') as json_file:
39
+ data = json.load(json_file)
40
+
41
+ contracts = []
42
+ for i, q in enumerate(data['data']):
43
+ contract = ' '.join(data['data'][i]['paragraphs'][0]['context'].split())
44
+ contracts.append(contract)
45
+ return contracts
46
+
47
+
48
+ questions = load_questions()
49
+ questions_short = load_questions_short()
50
+ # contracts = load_contracts()
51
+
52
+ ### DEFINE SIDEBAR
53
+ st.sidebar.title("Interactive Contract Analysis")
54
+ st.sidebar.markdown(
55
+ """
56
+ This model uses a pretrained snapshot trained on the [Atticus](https://www.atticusprojectai.org/) Dataset - CUAD
57
+
58
+ Model used for this demo: https://huggingface.co/marshmellow77/roberta-base-cuad
59
+
60
+ Related blog posts:
61
+ - https://bit.ly/3pKWICB
62
+ - https://bit.ly/3ETApRO
63
+ """
64
+ )
65
+
66
+ st.sidebar.header("Contract Selection")
67
+
68
+ # select contract
69
+ contracts_drop = ['Contract 1', 'Contract 2', 'Contract 3']
70
+ contracts_files = ['contract-1.txt', 'contract-2.txt', 'contract-3.txt']
71
+ contract = st.sidebar.selectbox('Please Select a Contract', contracts_drop)
72
+
73
+
74
+ idx = contracts_drop.index(contract)
75
+ with open('data/'+contracts_files[idx]) as f:
76
+ contract_data = f.read()
77
+
78
+ # upload contract
79
+ user_upload = st.sidebar.file_uploader('Please upload your own', type=['txt'],
80
+ accept_multiple_files=False)
81
+
82
+
83
+ # process upload
84
+ if user_upload is not None:
85
+ print(user_upload.name, user_upload.type)
86
+ extension = user_upload.name.split('.')[-1].lower()
87
+ if extension == 'txt':
88
+ print('text file uploaded')
89
+ # To convert to a string based IO:
90
+ stringio = StringIO(user_upload.getvalue().decode("utf-8"))
91
+
92
+ # To read file as string:
93
+ contract_data = stringio.read()
94
+
95
+ # elif extension == 'pdf':
96
+ # import PyPDF4
97
+ # try:
98
+ # # Extracting Text from PDFs
99
+ # pdfReader = PyPDF4.PdfFileReader(user_upload)
100
+ # print(pdfReader.numPages)
101
+ # contract_data = ''
102
+ # for i in range(0, pdfReader.numPages):
103
+ #
104
+ # print(i)
105
+ # pageobj = pdfReader.getPage(i)
106
+ # contract_data = contract_data + pageobj.extractText()
107
+ # except:
108
+ # st.warning('Unable to read PDF, please try another file')
109
+ #
110
+ # elif extension == 'docx':
111
+ # import docx2txt
112
+ #
113
+ # contract_data = docx2txt.process(user_upload)
114
+
115
+ else:
116
+ st.warning('Unknown uploaded file type, please try again')
117
+
118
+ results_drop = ['1', '2', '3']
119
+ number_results = st.sidebar.selectbox('Select number of results', results_drop)
120
+
121
+ ### DEFINE MAIN PAGE
122
+ st.header("Legal Contract Review Demo")
123
+ st.write("This demo uses the CUAD dataset for Contract Understanding.")
124
+
125
+ paragraph = st.text_area(label="Contract", value=contract_data, height=300)
126
+
127
+ questions_drop = questions_short
128
+ question_short = st.selectbox('Choose one of the 41 queries from the CUAD dataset:', questions_drop)
129
+ idxq = questions_drop.index(question_short)
130
+ question = questions[idxq]
131
+
132
+ if st.button('Analyze'):
133
+ if (not len(paragraph)==0) and not (len(question)==0):
134
+ print('getting predictions')
135
+ with st.spinner(text='Analysis in progress...'):
136
+ predictions = run_prediction([question], paragraph, 'marshmellow77/roberta-base-cuad',
137
+ n_best_size=5)
138
+ answer = ""
139
+ if predictions['0'] == "":
140
+ answer = 'No answer found in document'
141
+ else:
142
+ # if number_results == '1':
143
+ # answer = f"Answer: {predictions['0']}"
144
+ # # st.text_area(label="Answer", value=f"{answer}")
145
+ # else:
146
+ answer = ""
147
+ with open("nbest.json") as jf:
148
+ data = json.load(jf)
149
+ for i in range(int(number_results)):
150
+ answer += f"Answer {i+1}: {data['0'][i]['text']} -- \n"
151
+ answer += f"Probability: {round(data['0'][i]['probability']*100,1)}%\n\n"
152
+ st.success(answer)
153
+
154
+ else:
155
+ st.write("Unable to call model, please select question and contract")
data/contract-1.txt ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ By Client: /s/ Natalija Tunevic
2
+
3
+ Website Design, Development and Hosting Agreement
4
+
5
+ This Website Design, Development and Hosting Agreement the ("Agreement") is entered into on January 11, 2018 by and between Natalija Tunevic, director of FreeCook (hereinafter referred to as "Client") and Mitchell Vitalis, director of Mitchell's Web Advance, PLC (hereinafter referred to as "Company").
6
+
7
+ 1. Website Design and Development. Client agrees to pay to Company the sum of $5,000 (the "Contract Price") to design and develop a website for Client (the "Client Website") in accordance with the accompanying Scope of Work, attached to this Agreement as Exhibit A.
8
+
9
+ (a) Change Orders. Any changes to the Scope of Work following the execution of this Agreement requiring Additional Work must be submitted to and accepted by Company in writing as a "Change Order". The costs of any such changes shall be added to the Contract Price. Additional Work shall be defined as the addition or revision of pages, graphics, or other features, any text, graphic or page design or programming requiring more than two rounds of textual or graphical revisions, substantial revisions to text and/or content provided by Client, changes to elements which have been finalized, or significant changes in the Scope of Work.
10
+
11
+ (b) Due Dates and Delays. Company will use its best efforts to deliver the Client Website in the time frame specified in the Scope of Work. Terms of the project: 12 weeks from February 8, 2018 to May 3, 2018. Client acknowledges and agrees that any due dates set forth in the Scope of Work are subject to delay if Company does not receive the required materials or documentation in a timely manner or in the required format or if approvals are delayed by Client or if the Scope of Work is changed by Client.
12
+
13
+ (c) Client Submitted Content. All written content submitted by Client for use in the Client Website must be typewritten, proofread and delivered to Company in the body of an email message or as a Microsoft Word electronic document or plaint text electronic document. Any content submitted by Client in any other manner or format, including, but not limited to Adobe PDF format, will be returned to Client for resubmission. Company will not make any attempt to proof read or correct any contextual, grammatical or typographical errors in the written content submitted by Client. It is Client's sole responsibility to check the accuracy of the written content and correct any errors prior to submission for final publication. Company will assume that all the written content submitted by Client has been proofread and is ready for publication. Client may elect to pay Company the Hourly Rate set forth below to type and proofread any written content not submitted in the electronic formats specified above.
14
+
15
+ (d) Company License and Credit. Client hereby grants to Company a non-exclusive and limited license to use Client's trade names, logos and other trademarks in connection with Company advertising, marketing and promotion of its products and services. Client agrees that any unsolicited positive feedback Client provides to Company may be used in any Company marketing and/or advertising materials (i.e., customer testimonials). Client further agrees that Company may use and display the graphics and other web design elements of Client's website as examples of Company website design and development work. To maintain Company's portfolio credentials, and the integrity of any applicable copyrights, Company shall be entitled to place an unobtrusive credit in the footer on each page of Client's website. 2. Payment Terms. Upon the signing of this Agreement, Client agrees to pay to Company a total of $5,000. Client shall make a prepayment of $1,900 and pay the remaining $3,100 on completion of the Scope of Work.
16
+
17
+ 3. Business Hours; Rush Work. Company representatives are available during Company's normal business hours which are 9 a.m. to 5 p.m. UTC +2, Monday through Friday. Any email or telephone correspondence received after normal business hours will be processed the following business day. Client shall pay an additional surcharge for any services requiring work to be performed outside of normal business hours by reason of a rush deadline requested by Client or as a result of Client's failure to meet scheduled times for delivery and/or review and approval of information, content and materials. The surcharge for rush work shall be the standard hourly rate of $40 plus twenty-five percent (25%).
18
+
19
+ 4. Customer Service. Company, either directly or through its authorized service provider, shall provide customer service (the "Customer Service") relating to Client Website consisting of replying to customer questions or complaints regarding website hosting services during the normal business hours set forth. Company is not obligated to provide any Customer Service except as specified in this Section. Company at its sole discretion may at any time alter or cease providing the Customer Service which it has agreed to provide to Client relating to Client Website pursuant to this Agreement without any liability to Company.
20
+
21
+ AGREED AND ACCEPTED:
22
+
23
+ Date: Jan. 11, 2018
24
+
25
+ Source: FREECOOK, S-1, 6/5/2018
26
+
27
+
28
+
29
+
30
+
31
+ By Company: /s/ Mitchell Vitalis Date: Jan. 11, 2018
32
+
33
+ Mitchell's Web Advance - Website Design, Development and Hosting Agreement Page 1 of 2 Client: /s/ Natalija Tunevic Company: /s/ Mitchell Vitalis
34
+
35
+ Source: FREECOOK, S-1, 6/5/2018
36
+
37
+
38
+
39
+
40
+
41
+ Mitchell's Web Advance Website Design, Development and Hosting Agreement
42
+
43
+ Exhibit A
44
+
45
+ Scope of Work Development of design of Free Cook
46
+
47
+ Stage 1: 1. Search for competitors, collecting additional information on the subject. 2. Development of unique style of the Client Website. 3. Development of a logo based on the unique corporate style. 4. Designing UI/UX-practical parts. 5. Development of the main and internal pages of the Client Website.
48
+
49
+ Stage 2: 6. Emotional design (creation of web-assistants). 7. Adaptive design (mobile version of the Client Website). 8. Design adaptation to other languages. 9. Development of a prototype and interface testing.
50
+
51
+ Stage 3: 10. Search Engine Optimization.
52
+
53
+ Mitchell's Web Advance - Website Design, Development and Hosting Agreement Page 2 of 2 Client: /s/ Natalija Tunevic Company: /s/ Mitchell Vitalis
54
+
55
+ Source: FREECOOK, S-1, 6/5/2018
data/contract-2.txt ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SPONSORSHIP AGREEMENT This agreement (the "Agreement") is made effective this 1st day of April, 2018 ("Effective Date") between Fruit of Life Productions LLC, ("Promoter") and Eco Science Solutions, Inc.,("Sponsor"), 1135 Makawao Avenue, Suite 103-188, Makawao, Hawaii, 96768.
2
+
3
+ Contribution by Sponsor: In consideration for the right to sponsor the Kaya Fest and to be acknowledged by Fruit of Life Productions LLC., as a Promoter of the event during the term of this Agreement, Sponsor agrees to contract with Fruit of Life Productions LLC., for the amount of $250,000.00 to be paid in full upon signing of this agreement.
4
+
5
+ Bank Wire Transformation Information See Attached Wire Instructions
6
+
7
+ Sponsorship Benefits for Presenting Partner Sponsor:
8
+
9
+ * Main Stage named after your brand * 4 10x10 on site vendor booths * 50 VIP Sponsor Passes / 50 GA tickets for both days * 4 Parking passes * Opportunity to participate in after party * Banner placement in venue (10) * Approved audio/video assets to be provided as promotional use for Herbo * Name and phrase called out on stage between performers set * Your logo and a link from our website to your website * Your logo on video wall * Your company name and logo as a presenting sponsor * Banner at main entrance of venue * On stage banner placement * Logo in Backstage/VIP area * Mention on social media * Logo on Step and Repeat * Logo on all promotional print
10
+
11
+ Terms and Termination: The term of this agreement will begin on April 1, 2018 and continue until April 30, 2018 at 11:59pm.
12
+
13
+ Relationship of Parties: The parties are independent contractors with respect to one another. Nothing in this Agreement shall create any association, joint venture, partnership or agency relationship of any kind between the parties.
14
+
15
+ 1
16
+
17
+ Source: ECO SCIENCE SOLUTIONS, INC., 8-K, 4/6/2018
18
+
19
+
20
+
21
+
22
+
23
+ Intellectual Property: Fruit of Life Productions LLC is the sole owner of all right, title and interest to all Kaya Fest information including Logo, tag lines, (Education before Recreation), Trademarks, trade names and copyrighted information. Sponsor agrees that it will not use Kaya Fest property in a manner that states or implies that Kaya Fest endorses Sponsor (or Sponsors products or services) without written approval from Fruit of Life Productions LLC.
24
+
25
+ Idemnification: Sponsor shall indemnify and hold harmless, Fruit of Life Productions LLC, its related entities, partners, agents, officers, directors, employees, attorneys, heirs, successors, and assigns from against any and all claims, losses, damages, judgments, settlements, costs and expenses (including reasonable attorney's fees and expenses), and liabilities of every kind incurred as a result of: (i) any act or omission by Sponsor or its officers, directors, entities, employees, agents; (ii) any use of Sponsor's name, logo, Website, or other information, products, or service provided by Sponsor; and/or (iii) the inaccuracy or breach of any of the covenants, representations and warranties made by Sponsor in this Agreement. (iv) any changes in company value or brand value. The attendance and marketing reach estimates made in negotiations were made for the purposes of this agreement are mere estimate and not be interpreted as guaranties. . Confidentiality Confidential Information is all information that is marked such and all other information which a reasonable person would consider to be confidential. Confidential Information shall include, but is not limited to, information regarding the organization, its operations, programs, activities, financial condition, strategies, timelines, corporate/programming roadmap, surprise performers/guest appearances, event access information and membership or customer list. During the Term, each party shall use and reproduce the other party's Confidential Information only for purposes of this Agreement with written authorization by disclosing party, and only to the extent necessary for such purpose. Each party shall restrict disclosure of the other party's Confidential Information to its employees and agents with a reasonable need to know such Confidential Information, and shall not disclose the other party's Confidential Information to any third party without the prior written consent of the other party.
26
+
27
+ Cancellation: Kaya Fest shall not be liable to any Sponsor for losses arising out of, or the inability to perform its obligations under the terms of this sponsorship proposal due to acts of God, which include, that are not limited to, fire, flood, tornados, hurricanes, severe increments weather, strikes, medical failure, or any other acts beyond the control of Kaya Fest. Exhibiting: Sponsors are bound by the same terms and conditions, if exhibiting, as all other vendors of event. Sponsors must have their own liability insurance with limits of one million dollars.
28
+
29
+ Banners: Sponsors are responsible for creating their own banners. Banners placement will be determined by the Promoter. Sponsors are responsible for the hanging of their banners and removal after the event. Banners must be responsibility secured and not have any dangerous edges/sticks that may not cause harm if used inappropriately.
30
+
31
+ General Provisions: Warranties: Each party covenants, warrants and represents that it shall comply with all laws and regulations applicable to this Agreement performance of its obligations, and that it shall exercise due care and act in good faith at all times in the performance of its obligations hereunder. The provisions of this section shall survive termination of this Agreement. This agreement is not an attempt to give legal advice or constraints as it relates to Florida law and Cannabis/Marijuana law in any jurisdiction. The Sponsor understands that they are free to seek legal advice on the content of this agreement and applicable law from independent counsel. Binding effect: This Agreement shall bind the parties, their respective heirs, personal representatives, successors and assigns.
32
+
33
+ 2
34
+
35
+ Source: ECO SCIENCE SOLUTIONS, INC., 8-K, 4/6/2018
36
+
37
+
38
+
39
+
40
+
41
+ Governing Law: This Agreement shall be governed by and interpreted in accordance with the laws of the State of Florida, without regard to its conflict-of-laws or choice-of law principles. In case of a dispute, the parties agree to pursue Arbitration as the preferred method to seek a remedy and the parties waive the right to a jury trial. Assignment: This Agreement, or the rights granted under it, may not be assigned transferred or sublicense by either party without the express prior written consent of the other party. Entire Agreement: This Agreement and its attachments constitute the entire agreement between the parties and supersede all prior agreements, oral or written, relating to the Sponsorship. This Agreement may only be admitted in a writing signed by both parties. The agreement is confidential, and the parties agree not to file or record in public records. Notice: All notices given under this Agreement shall be in writing, addressed to the parties at the addresses set forth below, and shall be deemed to have the duly given when delivered when sent by overnight courier, or certified mail (return receipt requested).
42
+
43
+ Fruit of Life Productions LLC (Promoter) Address: 16115 SW 117t h Ave. Suite 21-A Miami, Florida 33177
44
+
45
+ EcoScience Solutions, Inc. (Sponsor) Address: 1135 Makawao Avenue, Suite 103-188 Makawao, Hawaii 96768
46
+
47
+ The Sponsor agrees that upon acceptance, this agreement shall be deemed to form and binding contract between the Sponsor and Promoter. The Sponsor agrees to abide by the terms set forth in the Terms and Conditions of Sponsorship agreement.
48
+
49
+ All parties have executed this Agreement through their duly authorized representatives as of the first date written below.
50
+
51
+ Sponsor: Eco Science Solutions, Inc.
52
+
53
+ By: /s/Jeffery Taylor Name: Jeffery Taylor Title: CEO Date: 4/01/2018
54
+
55
+ Promoter: Fruit of Life Productions LLC:
56
+
57
+ By:/s/Stella McLaughlan Name: Stella McLaughlan Title: Event Coordinator Date: 4/01/2018
58
+
59
+ 3
60
+
61
+ Source: ECO SCIENCE SOLUTIONS, INC., 8-K, 4/6/2018
data/contract-3.txt ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ EXHIBIT 10.1
2
+
3
+ BUSINESS AFFILIATE AGREEMENT
4
+
5
+ This Business Affiliate Agreement ("Agreement") dated January 28, 2005, effective as of October 15, 2004, ("Effective Date") is entered into by and between Dr. George D. Green (the "Business Affiliate") and UNION DENTAL CORP., a Florida corporation ("UDC") (collectively, Business Affiliate and UDC may be referred to collectively as the "Parties" and singularly as a ("Party").
6
+
7
+ RECITALS
8
+
9
+ WHEREAS, the Business Affiliate wishes to help further UDC's mission of Managing dental offices, whereby Business Affiliate and UDC will exchange confidential information (as defined below):
10
+
11
+ NOW THEREFORE, in consideration of the premises, covenants and agreements and the mutual promises herein made, and in consideration of the representations, warranties, and covenants herein contained, and for other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the Parties hereto agree as follows:
12
+
13
+ AGREEMENT
14
+
15
+ 1. Definitions. A Confidential Information@ shall mean any and all information that a Party may reasonably expect to remain confidential and not shared with the general public at any time or that information that is protected by law.
16
+
17
+ 2. Services. It is anticipated that the Business Affiliate will provide services both for clients of the Business Affiliate and UDC that involve the use and disclosure of Confidential Information (the "Services"). Except as otherwise specified herein, the Parties may make any and all uses of Confidential Information necessary to perform the Services. Additionally, the Parties may disclose Confidential Information for the purposes authorized by this Agreement only (a) to its employees, subcontractors and agents, in accordance with this Agreement, or (b) as directed by the other Party. The Parties expressly agree that any and all uses or disclosures of the Confidential Information by a Party will be done in accordance with the terms of this Agreement and the provisions of all applicable federal and state laws and regulations.
18
+
19
+ 3. Responsibilities of the Parties. With regard to its use and/or disclosure of Confidential Information, each Party hereby agrees to do the following:
20
+
21
+ a. Use and/or disclose the Confidential Information only as permitted or required by this Agreement or as otherwise required by law;
22
+
23
+ 1
24
+
25
+ b. Report to the other Party, in writing, any use and/or disclosure of the Confidential Information that is not permitted or required by this Agreement of which a Party becomes aware within five (5) days of a Party=s discovery of such unauthorized use and/or disclosure;
26
+
27
+ c. Use appropriate safeguards to maintain the security of the Confidential Information and to prevent unauthorized use and/or disclosure of such Confidential Information;
28
+
29
+ d. Require all of its employees, representatives, subcontractors or agents that receive or use or have access to Confidential Information under this Agreement to agree in writing to adhere to the same restrictions and conditions on the use and/or disclosure of Confidential Information that apply herein, including the obligation to return or destroy the Confidential Information as provided under paragraph g of this Section 3.
30
+
31
+ e. Make available, during normal business hours, at a Party=s offices all records, books, agreements, policies and procedures relating to the use and/or disclosure of Confidential Information that is subject to this Agreement, to the other Party within ten (10) days of a Party's written request, for the purpose of enabling a Party to verify the other Party=s compliance with the terms of this Agreement;
32
+
33
+ f. Within fifteen (15) days of receiving a written request from a Party, provide to the other Party such information as is requested by a Party to permit the other Party to respond to a request by the subject individual for amendment and accounting purposes of the disclosures of the individual=s Confidential Information;
34
+
35
+ g. Return to a Party or destroy, as requested by a Party, within fifteen (15) days of the termination of this Agreement, any Confidential Information provided to such Party and in its possession and retain no copies or back-up tapes;
36
+
37
+ h. Parties agrees to mitigate, to the extent practicable, any harmful effect that is known to a Party of a use or disclosure of Confidential Information by a Party in violation of the requirements of this Agreement;
38
+
39
+ i. To inform a Party of any changes in the form of notice of privacy practices that the other Party provides to individuals and provide the Party a copy of the notice currently in use; and
40
+
41
+ j. To inform the Party of any changes in, or withdrawal of, the consent or authorization provided to a Party by individuals whose Confidential Information may be used and/or disclosed by a Party under this Agreement.
42
+
43
+ 2
44
+
45
+ Source: UNION DENTAL HOLDINGS, INC., 8-K/A, 2/4/2005
46
+
47
+
48
+
49
+
50
+
51
+ 4. Mutual Representation and Warranty. Each Party represents and warrants to the other Party that all of its employees, agents, representatives and members of its work force, whose services may be used to fulfill obligations under this Agreement, are or shall be appropriately informed of the terms of this Agreement and are under legal obligation to comply fully with all provisions of this Agreement.
52
+
53
+ 5. Term and Termination.
54
+
55
+ a. Term. This Agreement shall become effective on the Effective Date and shall continue in effect until either Party informs the other Party with thirty (30) day prior written notice of termination of this Agreement.
56
+
57
+ b. Termination. UDC may immediately terminate this Agreement without notice and any related agreement if it determines that the Business Affiliate has breached a material provision of this Agreement or if the activities contemplated under this Agreement will result in a violation of any federal or state law or if such Services would, in the opinion of UDC and its counsel. Alternatively, UDC may choose to: (i) provide the Business Affiliate with ten (10) days written notice of the existence of an alleged material breach; and (ii) afford the Business Affiliate an opportunity to cure said alleged material breach upon mutually agreeable terms. Failure to cure in the manner set forth in this paragraph is grounds for the immediate termination of the Agreement.
58
+
59
+ c. Effect of Termination. Upon termination of this Agreement, for any reason, each Party hereto shall return to the other Party, or destroy, all of such Party's Confidential Information in the possession of the other Party. This provision shall apply to Confidential Information that is in the possession of subcontractors or agents of each Party. Each Party shall retain no copies of the Confidential Information of the other Party except as may be required by law.
60
+
61
+ 6. Indemnification. The Parties hereby covenant and agree to indemnify and hold harmless each other, it's agents and representatives from and against any and all losses, costs, expenses, liabilities, claims, demands, judgments and its settlements of every nature that are actually incurred by a Party, including without limitation reasonable attorney's fees for pre-trial, trial, appellate, judgment, post-judgment, execution, and alternative dispute resolution, which arise out of any use or disclosure of Confidential Information not specifically permitted by this Agreement or arise out of the services rendered by Business Affiliate. The provisions of this Paragraph 6 shall survive the termination of this Agreement for whatever reasons whatsoever.
62
+
63
+ 7. Miscellaneous.
64
+
65
+ a. Survival. The respective rights and obligations of Business Affiliate and UDC under the provisions of Sections 3(g) [Responsibilities of the Parties] and 3(h) [Responsibilities of the Parties] and 6 shall survive the termination of this Agreement indefinitely.
66
+
67
+ 3
68
+
69
+ b. Amendment. This Agreement may not be modified or amended, except in writing as agreed to by each Party.
70
+
71
+ c. No Third Party Beneficiaries. Nothing express or implied in this Agreement is intended to confer, nor anything herein shall confer, upon any person other than the Parties hereto any rights, remedies, obligations, or liabilities whatsoever.
72
+
73
+ d. Notices. All notices or communications required or permitted pursuant to the terms of this Agreement will be in writing and will be delivered in person or by means of certified or registered mail, postage prepaid, return receipt requested, to such Party at its last known address, or such other person or address as such Party may specify by similar notice to the other Party hereto or by telephone facsimile with a hard copy sent by mail on the next business day. All such notices will be deemed given upon delivery if delivered by hand, on the third business day after deposit with the U.S. Postal Service, and on the first business day after sending it by facsimile.
74
+
75
+ e. Relationship of the Parties. It is expressly understood and agreed that (i) in the performance of Services under this Agreement, the Business Affiliate shall at all times act as an independent contractor with respect to UDC and not as an employee or agent of UDC and (ii) nothing contained in this Agreement shall be construed to create a joint venture, partnership, association or other affiliation, or like relationship, between the Parties, it being specifically agreed that the relationship is and shall remain that of independent Parties to a contractual relationship. Accordingly, UDC shall neither have nor exercise any specific control or direction over the particular methods by which Business Affiliate performs services required by this Agreement. In no event shall either Party be liable for the debts or obligations of the other, except as otherwise specifically provided in this Agreement. Neither Party shall have any claim under this Agreement or otherwise against the other Party for vacation pay, paid sick leave, retirement benefits, social security, worker=s compensation, health, disability, professional malpractice or unemployment insurance benefits, or other employee benefits of any kind. Based on the foregoing, (i) Business Affiliate will not be treated as an employee of UDC for Federal tax purposes; (ii) UNION DENTAL CORP., will not withhold on behalf of Business Affiliate any sums for income tax, unemployment insurance, social security or any other withholding pursuant to any law or requirement of any government body, or make available any of the benefits afforded to employees of UDC (iii) all of such payments, withholdings or benefits due any governmental agency, if any, are Business Affiliate=s sole responsibility; and (iv) Business Affiliate will indemnify and hold harmless UDC from any and all loss or liability arising from his failure to make such payments, withholds and benefits, if any. In the event the Internal Revenue Service or any other governmental agency should question or challenge the Business Affiliate=s independent contractor status, the Parties hereby agree that both Business Affiliate and UDC shall have the right to participate in any discussions or negotiations
76
+
77
+ Source: UNION DENTAL HOLDINGS, INC., 8-K/A, 2/4/2005
78
+
79
+
80
+
81
+
82
+
83
+ 4
84
+
85
+ occurring with such agency or agencies, regardless of with whom or by whom such discussions or negotiations are initiated.
86
+
87
+ f. Business Affiliate acknowledges that the Business Affiliate has read, understood and accepted the terms and conditions in UDC's Business Affiliate manual, the terms and conditions of which are hereby incorporated into this agreement by reference.
88
+
89
+ IN WITNESS WHEREOF, the Parties hereto have caused this Agreement to be signed as of the date and year first above written.
90
+
91
+ Business Affiliate
92
+
93
+ --------------------------------
94
+
95
+ By: /s/ George D. Green -------------------------------- Name: George D. Green --------------------------------
96
+
97
+ Title: --------------------------------
98
+
99
+ UNION DENTAL CORP.
100
+
101
+ By: /s/ George D. Green -------------------------------- Name: George D. Green --------------------------------
102
+
103
+ Title:CEO and President --------------------------------
104
+
105
+ udc-8ka_ex10baa1.doc
106
+
107
+ 5
108
+
109
+ Source: UNION DENTAL HOLDINGS, INC., 8-K/A, 2/4/2005
data/questions.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Question 1: Highlight the parts (if any) of this contract related to "Document Name" that should be reviewed by a lawyer. Details: The name of the contract
2
+ Question 2: Highlight the parts (if any) of this contract related to "Parties" that should be reviewed by a lawyer. Details: The two or more parties who signed the contract
3
+ Question 3: Highlight the parts (if any) of this contract related to "Agreement Date" that should be reviewed by a lawyer. Details: The date of the contract
4
+ Question 4: Highlight the parts (if any) of this contract related to "Effective Date" that should be reviewed by a lawyer. Details: The date when the contract is effective 
5
+ Question 5: Highlight the parts (if any) of this contract related to "Expiration Date" that should be reviewed by a lawyer. Details: On what date will the contract's initial term expire?
6
+ Question 6: Highlight the parts (if any) of this contract related to "Renewal Term" that should be reviewed by a lawyer. Details: What is the renewal term after the initial term expires? This includes automatic extensions and unilateral extensions with prior notice.
7
+ Question 7: Highlight the parts (if any) of this contract related to "Notice Period To Terminate Renewal" that should be reviewed by a lawyer. Details: What is the notice period required to terminate renewal?
8
+ Question 8: Highlight the parts (if any) of this contract related to "Governing Law" that should be reviewed by a lawyer. Details: Which state/country's law governs the interpretation of the contract?
9
+ Question 9: Highlight the parts (if any) of this contract related to "Most Favored Nation" that should be reviewed by a lawyer. Details: Is there a clause that if a third party gets better terms on the licensing or sale of technology/goods/services described in the contract, the buyer of such technology/goods/services under the contract shall be entitled to those better terms?
10
+ Question 10: Highlight the parts (if any) of this contract related to "Non-Compete" that should be reviewed by a lawyer. Details: Is there a restriction on the ability of a party to compete with the counterparty or operate in a certain geography or business or technology sector? 
11
+ Question 11: Highlight the parts (if any) of this contract related to "Exclusivity" that should be reviewed by a lawyer. Details: Is there an exclusive dealing  commitment with the counterparty? This includes a commitment to procure all “requirements” from one party of certain technology, goods, or services or a prohibition on licensing or selling technology, goods or services to third parties, or a prohibition on  collaborating or working with other parties), whether during the contract or  after the contract ends (or both).
12
+ Question 12: Highlight the parts (if any) of this contract related to "No-Solicit Of Customers" that should be reviewed by a lawyer. Details: Is a party restricted from contracting or soliciting customers or partners of the counterparty, whether during the contract or after the contract ends (or both)?
13
+ Question 13: Highlight the parts (if any) of this contract related to "Competitive Restriction Exception" that should be reviewed by a lawyer. Details: This category includes the exceptions or carveouts to Non-Compete, Exclusivity and No-Solicit of Customers above.
14
+ Question 14: Highlight the parts (if any) of this contract related to "No-Solicit Of Employees" that should be reviewed by a lawyer. Details: Is there a restriction on a party’s soliciting or hiring employees and/or contractors from the  counterparty, whether during the contract or after the contract ends (or both)?
15
+ Question 15: Highlight the parts (if any) of this contract related to "Non-Disparagement" that should be reviewed by a lawyer. Details: Is there a requirement on a party not to disparage the counterparty?
16
+ Question 16: Highlight the parts (if any) of this contract related to "Termination For Convenience" that should be reviewed by a lawyer. Details: Can a party terminate this  contract without cause (solely by giving a notice and allowing a waiting  period to expire)?
17
+ Question 17: Highlight the parts (if any) of this contract related to "Rofr/Rofo/Rofn" that should be reviewed by a lawyer. Details: Is there a clause granting one party a right of first refusal, right of first offer or right of first negotiation to purchase, license, market, or distribute equity interest, technology, assets, products or services?
18
+ Question 18: Highlight the parts (if any) of this contract related to "Change Of Control" that should be reviewed by a lawyer. Details: Does one party have the right to terminate or is consent or notice required of the counterparty if such party undergoes a change of control, such as a merger, stock sale, transfer of all or substantially all of its assets or business, or assignment by operation of law?
19
+ Question 19: Highlight the parts (if any) of this contract related to "Anti-Assignment" that should be reviewed by a lawyer. Details: Is consent or notice required of a party if the contract is assigned to a third party?
20
+ Question 20: Highlight the parts (if any) of this contract related to "Revenue/Profit Sharing" that should be reviewed by a lawyer. Details: Is one party required to share revenue or profit with the counterparty for any technology, goods, or services?
21
+ Question 21: Highlight the parts (if any) of this contract related to "Price Restrictions" that should be reviewed by a lawyer. Details: Is there a restriction on the  ability of a party to raise or reduce prices of technology, goods, or  services provided?
22
+ Question 22: Highlight the parts (if any) of this contract related to "Minimum Commitment" that should be reviewed by a lawyer. Details: Is there a minimum order size or minimum amount or units per-time period that one party must buy from the counterparty under the contract?
23
+ Question 23: Highlight the parts (if any) of this contract related to "Volume Restriction" that should be reviewed by a lawyer. Details: Is there a fee increase or consent requirement, etc. if one party’s use of the product/services exceeds certain threshold?
24
+ Question 24: Highlight the parts (if any) of this contract related to "Ip Ownership Assignment" that should be reviewed by a lawyer. Details: Does intellectual property created  by one party become the property of the counterparty, either per the terms of the contract or upon the occurrence of certain events?
25
+ Question 25: Highlight the parts (if any) of this contract related to "Joint Ip Ownership" that should be reviewed by a lawyer. Details: Is there any clause providing for joint or shared ownership of intellectual property between the parties to the contract?
26
+ Question 26: Highlight the parts (if any) of this contract related to "License Grant" that should be reviewed by a lawyer. Details: Does the contract contain a license granted by one party to its counterparty?
27
+ Question 27: Highlight the parts (if any) of this contract related to "Non-Transferable License" that should be reviewed by a lawyer. Details: Does the contract limit the ability of a party to transfer the license being granted to a third party?
28
+ Question 28: Highlight the parts (if any) of this contract related to "Affiliate License-Licensor" that should be reviewed by a lawyer. Details: Does the contract contain a license grant by affiliates of the licensor or that includes intellectual property of affiliates of the licensor? 
29
+ Question 29: Highlight the parts (if any) of this contract related to "Affiliate License-Licensee" that should be reviewed by a lawyer. Details: Does the contract contain a license grant to a licensee (incl. sublicensor) and the affiliates of such licensee/sublicensor?
30
+ Question 30: Highlight the parts (if any) of this contract related to "Unlimited/All-You-Can-Eat-License" that should be reviewed by a lawyer. Details: Is there a clause granting one party an “enterprise,” “all you can eat” or unlimited usage license?
31
+ Question 31: Highlight the parts (if any) of this contract related to "Irrevocable Or Perpetual License" that should be reviewed by a lawyer. Details: Does the contract contain a  license grant that is irrevocable or perpetual?
32
+ Question 32: Highlight the parts (if any) of this contract related to "Source Code Escrow" that should be reviewed by a lawyer. Details: Is one party required to deposit its source code into escrow with a third party, which can be released to the counterparty upon the occurrence of certain events (bankruptcy,  insolvency, etc.)?
33
+ Question 33: Highlight the parts (if any) of this contract related to "Post-Termination Services" that should be reviewed by a lawyer. Details: Is a party subject to obligations after the termination or expiration of a contract, including any post-termination transition, payment, transfer of IP, wind-down, last-buy, or similar commitments?
34
+ Question 34: Highlight the parts (if any) of this contract related to "Audit Rights" that should be reviewed by a lawyer. Details: Does a party have the right to  audit the books, records, or physical locations of the counterparty to ensure compliance with the contract?
35
+ Question 35: Highlight the parts (if any) of this contract related to "Uncapped Liability" that should be reviewed by a lawyer. Details: Is a party’s liability uncapped upon the breach of its obligation in the contract? This also includes uncap liability for a particular type of breach such as IP infringement or breach of confidentiality obligation.
36
+ Question 36: Highlight the parts (if any) of this contract related to "Cap On Liability" that should be reviewed by a lawyer. Details: Does the contract include a cap on liability upon the breach of a party’s obligation? This includes time limitation for the counterparty to bring claims or maximum amount for recovery.
37
+ Question 37: Highlight the parts (if any) of this contract related to "Liquidated Damages" that should be reviewed by a lawyer. Details: Does the contract contain a clause that would award either party liquidated damages for breach or a fee upon the termination of a contract (termination fee)?
38
+ Question 38: Highlight the parts (if any) of this contract related to "Warranty Duration" that should be reviewed by a lawyer. Details: What is the duration of any  warranty against defects or errors in technology, products, or services  provided under the contract?
39
+ Question 39: Highlight the parts (if any) of this contract related to "Insurance" that should be reviewed by a lawyer. Details: Is there a requirement for insurance that must be maintained by one party for the benefit of the counterparty?
40
+ Question 40: Highlight the parts (if any) of this contract related to "Covenant Not To Sue" that should be reviewed by a lawyer. Details: Is a party restricted from contesting the validity of the counterparty’s ownership of intellectual property or otherwise bringing a claim against the counterparty for matters unrelated to the contract?
41
+ Question 41: Highlight the parts (if any) of this contract related to "Third Party Beneficiary" that should be reviewed by a lawyer. Details: Is there a non-contracting party who is a beneficiary to some or all of the clauses in the contract and therefore can enforce its rights against a contracting party?
data/questions_short.txt ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Question 1: What is the contract name?
2
+ Question 2: Who are the parties that signed the contract?
3
+ Question 3: What is the agreement date of the contract?
4
+ Question 4: What is the date when the contract is effective?
5
+ Question 5: What date will the contract's initial term expire?
6
+ Question 6: What is the renewal term after the initial term expires?
7
+ Question 7: What is the notice period required to terminate renewal?
8
+ Question 8: Which state/country's law governs the interpretation of the contract?
9
+ Question 9: What happens if a third party gets better terms in the contract?
10
+ Question 10: What is the restriction on the ability of a party to compete with the counterparty?
11
+ Question 11: Is there an exclusive dealing commitment with the counterparty?
12
+ Question 12: Is a party restricted from contracting or soliciting customers?
13
+ Question 13: What are the competitive restriction exceptions in the contract?
14
+ Question 14: Is there a restriction on a party’s soliciting or hiring employees?
15
+ Question 15: Is there a requirement on a party not to disparage the counterparty?
16
+ Question 16: Can a party terminate this contract without cause?
17
+ Question 17: What are the terms granting for right of first refusal, first offer, or negotiation?
18
+ Question 18: What are the terms about right of termination?
19
+ Question 19: Is consent or notice required of a party if the contract is assigned to a third party?
20
+ Question 20: What are the terms for revenue and profit sharing?
21
+ Question 21: What are the restrictions to raise or reduce prices of technology, goods, or services provided?
22
+ Question 22: Is there a minimum order size or minimum amount or units per-time period?
23
+ Question 23: What are the volume restrictions if one party’s use of the product/services exceeds certain threshold?
24
+ Question 24: What are the terms about intellectual property created by one party?
25
+ Question 25: What terms are related to joint IP ownership?
26
+ Question 26: Does the contract contain a license granted by one party to its counterparty?
27
+ Question 27: Does the contract limit the ability of a party to transfer the license being granted to a third party?
28
+ Question 28: Does the contract contain a license grant by affiliates of the licensor?
29
+ Question 29: Does the contract contain a license grant to a licensee?
30
+ Question 30: Is there a clause granting one party an “enterprise,” “all you can eat” or unlimited usage license?
31
+ Question 31: Does the contract contain a license grant that is irrevocable or perpetual?
32
+ Question 32: Is one party required to deposit its source code into escrow with a third party?
33
+ Question 33: Is a party subject to obligations after the termination or expiration of a contract?
34
+ Question 34: Does a party have the right to audit the books, records, or physical locations of the counterparty?
35
+ Question 35: Is a party’s liability uncapped upon the breach of its obligation in the contract?
36
+ Question 36: Does the contract include a cap on liability upon the breach of a party’s obligation?
37
+ Question 37: What clauses would either award either party liquidated damages for breach?
38
+ Question 38: What is the duration of any warranty against defects or errors in technology, products, or services?
39
+ Question 39: What are the requirements for insurance that must be maintained?
40
+ Question 40: What sections describe the covenant not to sue?
41
+ Question 41: What clauses relate to third-party beneficiaries?
predict.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import time
3
+ from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
4
+ from multiprocessing import cpu_count
5
+
6
+ from transformers import (
7
+ AutoConfig,
8
+ AutoModelForQuestionAnswering,
9
+ AutoTokenizer,
10
+ squad_convert_examples_to_features
11
+ )
12
+
13
+ from transformers.data.processors.squad import SquadResult, SquadV2Processor, SquadExample
14
+ from transformers.data.metrics.squad_metrics import compute_predictions_logits
15
+
16
+
17
+ def run_prediction(question_texts, context_text, model_path, n_best_size=1):
18
+ max_seq_length = 512
19
+ doc_stride = 256
20
+ n_best_size = n_best_size
21
+ max_query_length = 64
22
+ max_answer_length = 512
23
+ do_lower_case = False
24
+ null_score_diff_threshold = 0.0
25
+
26
+ def to_list(tensor):
27
+ return tensor.detach().cpu().tolist()
28
+
29
+ config_class, model_class, tokenizer_class = (AutoConfig, AutoModelForQuestionAnswering, AutoTokenizer)
30
+ config = config_class.from_pretrained(model_path)
31
+ tokenizer = tokenizer_class.from_pretrained(model_path, do_lower_case=True, use_fast=False)
32
+ model = model_class.from_pretrained(model_path, config=config)
33
+
34
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
35
+ model.to(device)
36
+
37
+ processor = SquadV2Processor()
38
+ examples = []
39
+
40
+ timer = time.time()
41
+ for i, question_text in enumerate(question_texts):
42
+
43
+ example = SquadExample(
44
+ qas_id=str(i),
45
+ question_text=question_text,
46
+ context_text=context_text,
47
+ answer_text=None,
48
+ start_position_character=None,
49
+ title="Predict",
50
+ answers=None,
51
+ )
52
+
53
+ examples.append(example)
54
+ print(f'Created Squad Examples in {time.time()-timer} seconds')
55
+
56
+ print(f'Number of CPUs: {cpu_count()}')
57
+ timer = time.time()
58
+ features, dataset = squad_convert_examples_to_features(
59
+ examples=examples,
60
+ tokenizer=tokenizer,
61
+ max_seq_length=max_seq_length,
62
+ doc_stride=doc_stride,
63
+ max_query_length=max_query_length,
64
+ is_training=False,
65
+ return_dataset="pt",
66
+ threads=cpu_count(),
67
+ )
68
+ print(f'Converted Examples to Features in {time.time()-timer} seconds')
69
+
70
+ eval_sampler = SequentialSampler(dataset)
71
+ eval_dataloader = DataLoader(dataset, sampler=eval_sampler, batch_size=10)
72
+
73
+ all_results = []
74
+
75
+ timer = time.time()
76
+ for batch in eval_dataloader:
77
+ model.eval()
78
+ batch = tuple(t.to(device) for t in batch)
79
+
80
+ with torch.no_grad():
81
+ inputs = {
82
+ "input_ids": batch[0],
83
+ "attention_mask": batch[1],
84
+ "token_type_ids": batch[2],
85
+ }
86
+
87
+ example_indices = batch[3]
88
+
89
+ outputs = model(**inputs)
90
+
91
+ for i, example_index in enumerate(example_indices):
92
+ eval_feature = features[example_index.item()]
93
+ unique_id = int(eval_feature.unique_id)
94
+
95
+ output = [to_list(output[i]) for output in outputs.to_tuple()]
96
+
97
+ start_logits, end_logits = output
98
+ result = SquadResult(unique_id, start_logits, end_logits)
99
+ all_results.append(result)
100
+ print(f'Model predictions completed in {time.time()-timer} seconds')
101
+
102
+ print(all_results)
103
+
104
+ output_nbest_file = None
105
+ if n_best_size > 1:
106
+ output_nbest_file = "nbest.json"
107
+
108
+ timer = time.time()
109
+ final_predictions = compute_predictions_logits(
110
+ all_examples=examples,
111
+ all_features=features,
112
+ all_results=all_results,
113
+ n_best_size=n_best_size,
114
+ max_answer_length=max_answer_length,
115
+ do_lower_case=do_lower_case,
116
+ output_prediction_file=None,
117
+ output_nbest_file=output_nbest_file,
118
+ output_null_log_odds_file=None,
119
+ verbose_logging=False,
120
+ version_2_with_negative=True,
121
+ null_score_diff_threshold=null_score_diff_threshold,
122
+ tokenizer=tokenizer
123
+ )
124
+ print(f'Logits converted to predictions in {time.time()-timer} seconds')
125
+
126
+ return final_predictions
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ boto3
2
+ torch
3
+ streamlit
4
+ transformers
5
+ PyPDF4