Uwais commited on
Commit
73df6bf
โ€ข
1 Parent(s): b5ebe93

small changes to styling

Browse files
pages/1_๐Ÿท_Label_Clause_Demo.py CHANGED
@@ -76,7 +76,7 @@ if button:
76
  top_labels=1)
77
  col1, col2 = st.columns(2)
78
  with col1:
79
- st.header('๐Ÿค– Prediction Results')
80
  st.write(
81
  f"The model predicts that this is a **{y_pred}** clause with **{y_probs.max() * 100:.2f}%** confidence.")
82
 
@@ -92,7 +92,7 @@ if button:
92
  st.plotly_chart(fig, use_container_width=True)
93
 
94
  with col2:
95
- st.header('๐Ÿ”ฎ Prediction Explainability')
96
  st.write(
97
  'We can perform an analysis to work out what terms in the clause were most important in deciding the predicted clause type:')
98
  components.html(exp.as_html(predict_proba=False), height=600)
 
76
  top_labels=1)
77
  col1, col2 = st.columns(2)
78
  with col1:
79
+ st.markdown('### ๐Ÿค– Prediction Results')
80
  st.write(
81
  f"The model predicts that this is a **{y_pred}** clause with **{y_probs.max() * 100:.2f}%** confidence.")
82
 
 
92
  st.plotly_chart(fig, use_container_width=True)
93
 
94
  with col2:
95
+ st.markdown('### ๐Ÿ”ฎ Prediction Explainability')
96
  st.write(
97
  'We can perform an analysis to work out what terms in the clause were most important in deciding the predicted clause type:')
98
  components.html(exp.as_html(predict_proba=False), height=600)
pages/2_๐Ÿท_Label_Contract_Demo.py CHANGED
@@ -101,7 +101,7 @@ if button:
101
  top_labels=1)
102
  col1, col2 = st.columns(2)
103
  with col1:
104
- st.header('๐Ÿค– Prediction Results')
105
  st.write(
106
  f"The model predicts that this contract is a **{y_pred.title()}** with **{y_probs.max() * 100:.2f}%** confidence.")
107
 
@@ -117,7 +117,7 @@ if button:
117
  st.plotly_chart(fig, use_container_width=True)
118
 
119
  with col2:
120
- st.header('๐Ÿ”ฎ Prediction Explainability')
121
  st.write(
122
  'We can perform an analysis to work out what terms in the contract were most important in deciding the predicted contract type:')
123
 
 
101
  top_labels=1)
102
  col1, col2 = st.columns(2)
103
  with col1:
104
+ st.subheader('๐Ÿค– Prediction Results')
105
  st.write(
106
  f"The model predicts that this contract is a **{y_pred.title()}** with **{y_probs.max() * 100:.2f}%** confidence.")
107
 
 
117
  st.plotly_chart(fig, use_container_width=True)
118
 
119
  with col2:
120
+ st.subheader('๐Ÿ”ฎ Prediction Explainability')
121
  st.write(
122
  'We can perform an analysis to work out what terms in the contract were most important in deciding the predicted contract type:')
123
 
pages/3_โ›_Extract_Demo.py CHANGED
@@ -144,7 +144,7 @@ if button:
144
  doc = add_detected_persons_as_parties(doc)
145
 
146
  with col1:
147
- st.header('๐ŸŽจ Highlighted Text')
148
 
149
  colors = {'party': "#85C1E9", "address": "#ff6961", "agreement_date": "#5de36f", "role": "#b05de3"}
150
  options = {"ents": ['party', 'address', 'agreement_date', 'role'], "colors": colors}
@@ -170,7 +170,7 @@ if button:
170
  'Label': []
171
  }
172
 
173
- st.header('๐Ÿ“Š Extracted Data')
174
  for span in doc.spans['sc']:
175
  data['Label'].append(span.label_)
176
  data['Text'].append(span.text)
 
144
  doc = add_detected_persons_as_parties(doc)
145
 
146
  with col1:
147
+ st.subheader('๐ŸŽจ Highlighted Text')
148
 
149
  colors = {'party': "#85C1E9", "address": "#ff6961", "agreement_date": "#5de36f", "role": "#b05de3"}
150
  options = {"ents": ['party', 'address', 'agreement_date', 'role'], "colors": colors}
 
170
  'Label': []
171
  }
172
 
173
+ st.subheader('๐Ÿ“Š Extracted Data')
174
  for span in doc.spans['sc']:
175
  data['Label'].append(span.label_)
176
  data['Text'].append(span.text)
pages/5_๐Ÿ—‚_Organise_Demo.py CHANGED
@@ -14,6 +14,7 @@ st.set_page_config(
14
  )
15
 
16
  add_logo_to_sidebar()
 
17
 
18
  st.title('๐Ÿ—‚ Organise Demo')
19
  st.markdown("๐Ÿ— This demo is under construction. Please visit back soon.")
 
14
  )
15
 
16
  add_logo_to_sidebar()
17
+ st.sidebar.success("๐Ÿ‘† Select a demo above.")
18
 
19
  st.title('๐Ÿ—‚ Organise Demo')
20
  st.markdown("๐Ÿ— This demo is under construction. Please visit back soon.")
pages/6_๐Ÿ”Ž_Find_Demo.py CHANGED
@@ -14,6 +14,7 @@ st.set_page_config(
14
  )
15
 
16
  add_logo_to_sidebar()
 
17
 
18
  st.title('๐Ÿ”Ž Find Demo')
19
  st.markdown("๐Ÿ— This demo is currently under construction. Please visit back soon.")
 
14
  )
15
 
16
  add_logo_to_sidebar()
17
+ st.sidebar.success("๐Ÿ‘† Select a demo above.")
18
 
19
  st.title('๐Ÿ”Ž Find Demo')
20
  st.markdown("๐Ÿ— This demo is currently under construction. Please visit back soon.")
pages/7_โœ๏ธ_Draft_Demo.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from utils import add_logo_to_sidebar, add_footer, add_email_signup_form
3
+
4
+ st.set_page_config(
5
+ page_title="Draft Demo",
6
+ page_icon="โœ๏ธ",
7
+ layout="wide",
8
+ initial_sidebar_state="expanded",
9
+ menu_items={
10
+ 'Get Help': 'mailto:[email protected]',
11
+ 'Report a bug': None,
12
+ 'About': "## This a demo showcasing different Legal AI Actions"
13
+ }
14
+ )
15
+
16
+ add_logo_to_sidebar()
17
+ st.sidebar.success("๐Ÿ‘† Select a demo above.")
18
+
19
+ st.title('โœ๏ธ Draft Demo')
20
+ st.markdown("๐Ÿ— This demo is currently under construction. Please visit back soon.")
21
+
22
+ add_email_signup_form()
23
+
24
+ add_footer()
pages/8_๐Ÿ“_Summarise_Demo.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from utils import add_logo_to_sidebar, add_footer, add_email_signup_form
3
+
4
+ st.set_page_config(
5
+ page_title="Summarise Demo",
6
+ page_icon="๐Ÿ“",
7
+ layout="wide",
8
+ initial_sidebar_state="expanded",
9
+ menu_items={
10
+ 'Get Help': 'mailto:[email protected]',
11
+ 'Report a bug': None,
12
+ 'About': "## This a demo showcasing different Legal AI Actions"
13
+ }
14
+ )
15
+
16
+ add_logo_to_sidebar()
17
+ st.sidebar.success("๐Ÿ‘† Select a demo above.")
18
+
19
+ st.title('๐Ÿ“ Summarise Demo')
20
+ st.markdown("๐Ÿ— This demo is currently under construction. Please visit back soon.")
21
+
22
+ add_email_signup_form()
23
+
24
+ add_footer()
utils.py CHANGED
@@ -7,7 +7,7 @@ import mailerlite as MailerLite
7
  import streamlit as st
8
 
9
  client = MailerLite.Client({
10
- 'api_key': os.environ['mailerlitetoken']
11
  })
12
  NEWSLETTER_GROUP_ID = "74940965074240697"
13
 
@@ -35,10 +35,12 @@ def add_logo_to_sidebar():
35
 
36
  def add_footer():
37
  st.markdown("""
38
- ### ๐Ÿค” Interested in hiring us to build bespoke Legal AI solutions?
39
  - ๐ŸŒ Check out our [website](https://simplexico.ai)
40
  - ๐Ÿ“ž Book a call with [us](https://calendly.com/uwais-iqbal/discovery-call)
41
  - โœ‰๏ธ Send us an [email](mailto:[email protected])
 
 
42
  """)
43
 
44
 
 
7
  import streamlit as st
8
 
9
  client = MailerLite.Client({
10
+ 'api_key': 'HELLO'
11
  })
12
  NEWSLETTER_GROUP_ID = "74940965074240697"
13
 
 
35
 
36
  def add_footer():
37
  st.markdown("""
38
+ ### ๐Ÿ™‹โ€โ™‚๏ธ Hire us to build out your own tailored Legal AI solutions!
39
  - ๐ŸŒ Check out our [website](https://simplexico.ai)
40
  - ๐Ÿ“ž Book a call with [us](https://calendly.com/uwais-iqbal/discovery-call)
41
  - โœ‰๏ธ Send us an [email](mailto:[email protected])
42
+
43
+ **Follow Us on Social Media** - [๐Ÿฅ Twitter](https://twitter.com/_simplexico) | [๐Ÿ’ผ LinkedIn](https://www.linkedin.com/company/simplexico/?viewAsMember=true)
44
  """)
45
 
46
 
๐Ÿก_Home.py CHANGED
@@ -16,7 +16,7 @@ st.set_page_config(
16
  ## Add logo to sidebar
17
  add_logo_to_sidebar()
18
 
19
- st.title("๐Ÿ‘‹ Welcome to the Legal AI Demos from simplexico!")
20
 
21
  st.sidebar.success("๐Ÿ‘† Select a demo above.")
22
 
@@ -33,9 +33,19 @@ st.markdown(
33
  - ๐Ÿ”— **Compare** - Using AI to **compare** passages of text
34
  - ๐Ÿ—‚ **Organise** - Using AI to **organise** a collection of texts
35
  - ๐Ÿ”Ž **Find** - Using AI to **find** relevant information from a collection of texts
 
 
36
 
37
  **๐Ÿ‘ˆ Select a demo from the sidebar** to see some examples of what Legal AI can do!
38
 
 
 
 
 
 
 
 
 
39
  ### ๐Ÿ— What goes into making an AI model?
40
  Building an AI model is a lot like cooking.
41
  A ๐Ÿ‘ฉโ€๐Ÿณ chef (data scientist) combines the ๐Ÿฅ’ ingredients (data) according to a recipe ๐Ÿ“œ (algorithm)
@@ -56,8 +66,7 @@ st.markdown(
56
  We have the Legal AI Chefs ๐Ÿ‘ฉโ€๐Ÿณ and recipes ๐Ÿ“œ.
57
  You have the ingredients ๐Ÿฅ’ (data).
58
  We can tailor some yummy Legal AI meals for your taste ๐Ÿฅง!
59
- """)
60
-
61
- add_email_signup_form()
62
 
63
  add_footer()
 
16
  ## Add logo to sidebar
17
  add_logo_to_sidebar()
18
 
19
+ st.title("๐Ÿ‘‹ Welcome - Legal AI Demos from simplexico!")
20
 
21
  st.sidebar.success("๐Ÿ‘† Select a demo above.")
22
 
 
33
  - ๐Ÿ”— **Compare** - Using AI to **compare** passages of text
34
  - ๐Ÿ—‚ **Organise** - Using AI to **organise** a collection of texts
35
  - ๐Ÿ”Ž **Find** - Using AI to **find** relevant information from a collection of texts
36
+ - โœ๏ธ **Draft** - Using AI to **draft** text
37
+ - ๐Ÿ“ **Summarise** - Using AI to **summarise** text
38
 
39
  **๐Ÿ‘ˆ Select a demo from the sidebar** to see some examples of what Legal AI can do!
40
 
41
+ ๐Ÿ“ข FYI - These demos are to help you understand AI better. They have not been optimised for prediction performance.
42
+ """)
43
+
44
+ add_email_signup_form()
45
+
46
+
47
+ st.markdown(
48
+ """
49
  ### ๐Ÿ— What goes into making an AI model?
50
  Building an AI model is a lot like cooking.
51
  A ๐Ÿ‘ฉโ€๐Ÿณ chef (data scientist) combines the ๐Ÿฅ’ ingredients (data) according to a recipe ๐Ÿ“œ (algorithm)
 
66
  We have the Legal AI Chefs ๐Ÿ‘ฉโ€๐Ÿณ and recipes ๐Ÿ“œ.
67
  You have the ingredients ๐Ÿฅ’ (data).
68
  We can tailor some yummy Legal AI meals for your taste ๐Ÿฅง!
69
+ """
70
+ )
 
71
 
72
  add_footer()