Spaces:
Runtime error
Runtime error
gaspar-avit
commited on
Commit
·
801630b
1
Parent(s):
34229c4
Upload app.py
Browse files
app.py
CHANGED
@@ -127,9 +127,13 @@ def get_input_data():
|
|
127 |
with col_ap_hi:
|
128 |
session.input_data.loc[0, 'ap_hi'] = st.slider(
|
129 |
'Systolic blood pressure', 90, 200)
|
|
|
|
|
130 |
with col_ap_lo:
|
131 |
session.input_data.loc[0, 'ap_lo'] = st.slider(
|
132 |
'Diastolic blood pressure', 50, 120)
|
|
|
|
|
133 |
|
134 |
# Row 4
|
135 |
col_chole, col_gluc = st.columns(2)
|
@@ -143,17 +147,20 @@ def get_input_data():
|
|
143 |
else 3][0]
|
144 |
session.input_data["cholesterol"] = (session
|
145 |
.input_data["cholesterol"]
|
|
|
146 |
.astype('category')
|
147 |
)
|
148 |
-
|
149 |
with col_gluc:
|
150 |
gluc = st.radio(
|
151 |
'Glucose', ['Normal', 'Above normal', 'Well above normal'])
|
152 |
session.input_data.loc[0, 'gluc'] = [
|
153 |
1 if 'Normal' in gluc else 2 if 'Above normal' in gluc
|
154 |
else 3][0]
|
155 |
-
session.input_data["gluc"] = session
|
156 |
-
|
|
|
|
|
|
|
157 |
|
158 |
# Row 5
|
159 |
col_alco, col_smk = st.columns(2)
|
|
|
127 |
with col_ap_hi:
|
128 |
session.input_data.loc[0, 'ap_hi'] = st.slider(
|
129 |
'Systolic blood pressure', 90, 200)
|
130 |
+
session.input_data["ap_hi"] = session.input_data["ap_hi"].astype(
|
131 |
+
int)
|
132 |
with col_ap_lo:
|
133 |
session.input_data.loc[0, 'ap_lo'] = st.slider(
|
134 |
'Diastolic blood pressure', 50, 120)
|
135 |
+
session.input_data["ap_lo"] = session.input_data["ap_lo"].astype(
|
136 |
+
int)
|
137 |
|
138 |
# Row 4
|
139 |
col_chole, col_gluc = st.columns(2)
|
|
|
147 |
else 3][0]
|
148 |
session.input_data["cholesterol"] = (session
|
149 |
.input_data["cholesterol"]
|
150 |
+
.astype(int)
|
151 |
.astype('category')
|
152 |
)
|
|
|
153 |
with col_gluc:
|
154 |
gluc = st.radio(
|
155 |
'Glucose', ['Normal', 'Above normal', 'Well above normal'])
|
156 |
session.input_data.loc[0, 'gluc'] = [
|
157 |
1 if 'Normal' in gluc else 2 if 'Above normal' in gluc
|
158 |
else 3][0]
|
159 |
+
session.input_data["gluc"] = (session
|
160 |
+
.input_data["gluc"]
|
161 |
+
.astype(int)
|
162 |
+
.astype('category')
|
163 |
+
)
|
164 |
|
165 |
# Row 5
|
166 |
col_alco, col_smk = st.columns(2)
|