Duy-Anh Dang commited on
Commit
5d9f0d7
·
1 Parent(s): e1c2837

background and new time

Browse files
Files changed (1) hide show
  1. app.py +16 -20
app.py CHANGED
@@ -21,6 +21,7 @@ from io import BytesIO
21
  from bs4 import BeautifulSoup
22
  import matplotlib.pyplot as plt
23
  import numpy as np
 
24
 
25
 
26
  def table_data():
@@ -90,14 +91,14 @@ def parse_email(uploaded_file):
90
  parsed_email.append(paragraph.text)
91
  return parsed_email
92
 
93
- def email_upload():
94
- print("Please upload your email (In HTML Format)")
95
  # upload = FileUpload(accept='.html', multiple=True)
96
  # display(upload)
97
  # return upload
98
- fc = FileChooser()
99
- display(fc)
100
- return fc
101
 
102
 
103
  # New - In-Use
@@ -181,39 +182,33 @@ def add_bg_from_url():
181
  background-image: linear-gradient(#0A3144,#126072,#1C8D99);
182
  background-attachment: fixed;
183
  background-size: cover
 
184
  }}
185
  </style>
186
  """,
187
  unsafe_allow_html=True
188
  )
189
 
190
- # add_bg_from_url()
191
-
192
 
193
  st.markdown("# Character Count: Email Industry")
194
 
195
- # col1, col2, col3 = st.columns([1,1,1])
196
-
197
- # with col2:
198
- # img = PIL.Image.open("figures/ModelCC_solid.png")
199
- # st.image(img)
200
 
201
  stats_col1, stats_col2, stats_col3, stats_col4 = st.columns([1, 1, 1, 1])
202
 
203
  with stats_col1:
204
- st.metric(label="Production", value="Production")
205
  with stats_col2:
206
- st.metric(label="Accuracy", value="85%")
207
-
208
  with stats_col3:
209
- st.metric(label="Speed", value="3.86 ms")
210
-
211
  with stats_col4:
212
- st.metric(label="Industry", value="Email")
213
 
214
 
215
  with st.sidebar:
216
-
217
  with st.expander('Model Description', expanded=False):
218
  img = PIL.Image.open("figures/ModelCC.png")
219
  st.image(img)
@@ -493,4 +488,5 @@ if st.button('Generate Predictions'):
493
 
494
 
495
  placeholder.empty()
496
- # print(time.time() - start_time)
 
 
21
  from bs4 import BeautifulSoup
22
  import matplotlib.pyplot as plt
23
  import numpy as np
24
+ import timeit
25
 
26
 
27
  def table_data():
 
91
  parsed_email.append(paragraph.text)
92
  return parsed_email
93
 
94
+ #def email_upload():
95
+ # print("Please upload your email (In HTML Format)")
96
  # upload = FileUpload(accept='.html', multiple=True)
97
  # display(upload)
98
  # return upload
99
+ # fc = FileChooser()
100
+ # display(fc)
101
+ # return fc
102
 
103
 
104
  # New - In-Use
 
182
  background-image: linear-gradient(#0A3144,#126072,#1C8D99);
183
  background-attachment: fixed;
184
  background-size: cover
185
+
186
  }}
187
  </style>
188
  """,
189
  unsafe_allow_html=True
190
  )
191
 
192
+ add_bg_from_url()
193
+ #linear-gradient(0deg,#010405 0,#061c2c 55%,#0a3144 75%,#0f4d60)
194
 
195
  st.markdown("# Character Count: Email Industry")
196
 
 
 
 
 
 
197
 
198
  stats_col1, stats_col2, stats_col3, stats_col4 = st.columns([1, 1, 1, 1])
199
 
200
  with stats_col1:
201
+ st.caption("Verified: Production")
202
  with stats_col2:
203
+ st.caption("Accuracy: 85%")
 
204
  with stats_col3:
205
+ st.caption("Speed: 16.89 ms")
 
206
  with stats_col4:
207
+ st.caption("Industry: Email")
208
 
209
 
210
  with st.sidebar:
211
+
212
  with st.expander('Model Description', expanded=False):
213
  img = PIL.Image.open("figures/ModelCC.png")
214
  st.image(img)
 
488
 
489
 
490
  placeholder.empty()
491
+ #st.write(time.time() - start_time)
492
+