Truong-Phuc Nguyen commited on
Commit
6b86935
1 Parent(s): 07e5bbb

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +6 -6
Home.py CHANGED
@@ -169,9 +169,9 @@ if predict:
169
  X_6 = np.array([[vtn, vn, vcn, cl, ttp, ttt]])
170
  X_6 = scaler_6.transform(X_6)
171
  y_6 = clf_6.predict(X_6)
172
- y_pred = convert_prediction(y_6)
173
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
174
- styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred}</span> size!</h3>"
175
  st.markdown(styled_text, unsafe_allow_html=True)
176
 
177
  elif num_of_features == '8 measurements':
@@ -179,14 +179,14 @@ if predict:
179
  X_8 = scaler_8.transform(X_8)
180
  y_8 = clf_8.predict(X_8)
181
  # st.success(f'We recommend you choosing **{convert_prediction(np.argmax(y_8, axis=1))}** size!')
182
- y_pred = convert_prediction(y_8)
183
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
184
- styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred}</span> size!</h3>"
185
  else:
186
  X_21 = np.array([[h, w, bmi, vtn, vn, vcn, cn, cnnp, cnnt, cntp, cntt, ccnp, ccnt, snt, sndp, sndt, xup, xut, cl, ttp, ttt]])
187
  X_21 = scaler_21.transform(X_21)
188
  y_21 = clf_21.predict(X_21)
189
  # st.success(f'We recommend you choosing **{convert_prediction(np.argmax(y_21, axis=1))}** size!')
190
- y_pred = convert_prediction(y_21)
191
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
192
- styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred}</span> size!</h3>"
 
169
  X_6 = np.array([[vtn, vn, vcn, cl, ttp, ttt]])
170
  X_6 = scaler_6.transform(X_6)
171
  y_6 = clf_6.predict(X_6)
172
+ y_pred_6 = convert_prediction(y_6)
173
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
174
+ styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred_6}</span> size!</h3>"
175
  st.markdown(styled_text, unsafe_allow_html=True)
176
 
177
  elif num_of_features == '8 measurements':
 
179
  X_8 = scaler_8.transform(X_8)
180
  y_8 = clf_8.predict(X_8)
181
  # st.success(f'We recommend you choosing **{convert_prediction(np.argmax(y_8, axis=1))}** size!')
182
+ y_pred_8 = convert_prediction(y_8)
183
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
184
+ styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred_8}</span> size!</h3>"
185
  else:
186
  X_21 = np.array([[h, w, bmi, vtn, vn, vcn, cn, cnnp, cnnt, cntp, cntt, ccnp, ccnt, snt, sndp, sndt, xup, xut, cl, ttp, ttt]])
187
  X_21 = scaler_21.transform(X_21)
188
  y_21 = clf_21.predict(X_21)
189
  # st.success(f'We recommend you choosing **{convert_prediction(np.argmax(y_21, axis=1))}** size!')
190
+ y_pred_21 = convert_prediction(y_21)
191
  # st.success(f'We recommend you choosing **{convert_prediction(y_6)}** size!')
192
+ styled_text = f"<h3 style='text-align: center;'>We recommend you choosing <span style='color: red; font-weight: bold;'>{y_pred_21}</span> size!</h3>"