gaspar-avit commited on
Commit
25a55a5
·
1 Parent(s): 858128d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -13,6 +13,7 @@ from streamlit import session_state as session
13
  from htbuilder import HtmlElement, div, hr, a, p, styles
14
  from htbuilder.units import percent, px
15
  from catboost import CatBoostClassifier
 
16
 
17
 
18
  ###############################
@@ -183,6 +184,10 @@ def generate_prediction(input_data):
183
 
184
  -return: prediction of cardiovascular disease probability
185
  """
 
 
 
 
186
  return MODEL.predict(input_data)
187
 
188
 
@@ -217,7 +222,6 @@ if __name__ == "__main__":
217
 
218
  # Get inputs
219
  session.input_data = get_input_data()
220
- st.write(session.input_data)
221
 
222
  # Create button to trigger poster generation
223
  buffer1, col1, buffer2 = st.columns([1.3, 1, 1])
@@ -230,6 +234,9 @@ if __name__ == "__main__":
230
  if IS_CLICKED:
231
  st.write('Work in progress!')
232
  prediction = generate_prediction(session.input_data)
 
 
 
233
  st.write(prediction)
234
 
235
  st.text("")
 
13
  from htbuilder import HtmlElement, div, hr, a, p, styles
14
  from htbuilder.units import percent, px
15
  from catboost import CatBoostClassifier
16
+ from datetime import datetime
17
 
18
 
19
  ###############################
 
184
 
185
  -return: prediction of cardiovascular disease probability
186
  """
187
+
188
+ current_time = datetime.now().strftime("%H:%M:%S")
189
+ st.write("Current Time =", current_time)
190
+ st.write(input_data)
191
  return MODEL.predict(input_data)
192
 
193
 
 
222
 
223
  # Get inputs
224
  session.input_data = get_input_data()
 
225
 
226
  # Create button to trigger poster generation
227
  buffer1, col1, buffer2 = st.columns([1.3, 1, 1])
 
234
  if IS_CLICKED:
235
  st.write('Work in progress!')
236
  prediction = generate_prediction(session.input_data)
237
+ current_time = datetime.now().strftime("%H:%M:%S")
238
+ st.write("Current Time =", current_time)
239
+ st.write(session.input_data)
240
  st.write(prediction)
241
 
242
  st.text("")