gaspar-avit commited on
Commit
5fde9b8
1 Parent(s): 60434b7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -39,7 +39,7 @@ def layout(*args):
39
  height=px(10),
40
  color="black",
41
  text_align="center",
42
- #height="auto",
43
  opacity=1
44
  )
45
 
@@ -73,7 +73,7 @@ def footer():
73
  myargs = [
74
  "Made by ",
75
  link("https://www.linkedin.com/in/gaspar-avit/", "Gaspar Avit"),
76
- ] #with ❤️
77
  layout(*myargs)
78
 
79
 
@@ -90,11 +90,13 @@ def input_layout():
90
  with input_expander:
91
  # Row 1
92
  col_age, col_sex = st.columns(2)
93
- col_age = st.slider('Age', 18, 75, on_change=update_prediction())
94
- col_sex = st.radio('Sex', ['Female', 'Male'],
95
- on_change=update_prediction())
96
- st.write('div.row-widget.stRadio > div{flex-direction: row \
97
- justify-content: center}', unsafe_allow_html=True)
 
 
98
 
99
  # Row 2
100
  col_height, col_weight = st.columns(2)
@@ -109,7 +111,7 @@ def input_layout():
109
  'AP Hi', 90, 200, on_change=update_prediction())
110
  col_ap_lo = st.slider(
111
  'AP Lo', 50, 120, on_change=update_prediction())
112
-
113
 
114
  ###############################
115
  ## --------- MAIN ---------- ##
@@ -118,7 +120,6 @@ def input_layout():
118
 
119
  if __name__ == "__main__":
120
 
121
-
122
  ## --- Page config ------------ ##
123
  # Set page title
124
  st.title("""
@@ -130,17 +131,17 @@ if __name__ == "__main__":
130
  """)
131
 
132
  # Set page footer
133
- footer()
134
-
135
  # Initialize clicking flag
136
  is_clicked = False
137
-
138
  ## --------------------------- ##
139
 
140
  # Load classification model
141
  model = CatBoostClassifier() # parameters not required.
142
  model.load_model('./model.cbm')
143
-
144
  for root, dirs, files in os.walk("./"):
145
  for file in files:
146
  if file.endswith(".cbm"):
@@ -148,4 +149,4 @@ if __name__ == "__main__":
148
  # model.load_model(os.path.join(root, file))
149
 
150
  # Define inputs
151
- input_layout()
 
39
  height=px(10),
40
  color="black",
41
  text_align="center",
42
+ # height="auto",
43
  opacity=1
44
  )
45
 
 
73
  myargs = [
74
  "Made by ",
75
  link("https://www.linkedin.com/in/gaspar-avit/", "Gaspar Avit"),
76
+ ] # with ❤️
77
  layout(*myargs)
78
 
79
 
 
90
  with input_expander:
91
  # Row 1
92
  col_age, col_sex = st.columns(2)
93
+ with col_age:
94
+ st.slider('Age', 18, 75, on_change=update_prediction())
95
+ with col_sex:
96
+ st.radio('Sex', ['Female', 'Male'],
97
+ on_change=update_prediction())
98
+ # st.write('div.row-widget.stRadio > div{flex-direction: row \
99
+ # justify-content: center}', unsafe_allow_html=True)
100
 
101
  # Row 2
102
  col_height, col_weight = st.columns(2)
 
111
  'AP Hi', 90, 200, on_change=update_prediction())
112
  col_ap_lo = st.slider(
113
  'AP Lo', 50, 120, on_change=update_prediction())
114
+
115
 
116
  ###############################
117
  ## --------- MAIN ---------- ##
 
120
 
121
  if __name__ == "__main__":
122
 
 
123
  ## --- Page config ------------ ##
124
  # Set page title
125
  st.title("""
 
131
  """)
132
 
133
  # Set page footer
134
+ # footer()
135
+
136
  # Initialize clicking flag
137
  is_clicked = False
138
+
139
  ## --------------------------- ##
140
 
141
  # Load classification model
142
  model = CatBoostClassifier() # parameters not required.
143
  model.load_model('./model.cbm')
144
+
145
  for root, dirs, files in os.walk("./"):
146
  for file in files:
147
  if file.endswith(".cbm"):
 
149
  # model.load_model(os.path.join(root, file))
150
 
151
  # Define inputs
152
+ input_layout()