Truong-Phuc Nguyen commited on
Commit
7cfdc8b
1 Parent(s): 8ba1c85

Update Home.py

Browse files

Final version :)))

Files changed (1) hide show
  1. Home.py +3 -1
Home.py CHANGED
@@ -181,9 +181,11 @@ if predict:
181
  st.success(y_8)
182
  y_pred_8 = convert_prediction(np.argmax(y_8, axis=1))
183
  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>"
 
184
  else:
185
  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]])
186
  X_21 = scaler_21.transform(X_21)
187
  y_21 = clf_21.predict(X_21)
188
  y_pred_21 = convert_prediction(np.argmax(y_21, axis=1))
189
- 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>"
 
 
181
  st.success(y_8)
182
  y_pred_8 = convert_prediction(np.argmax(y_8, axis=1))
183
  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>"
184
+ st.markdown(styled_text, unsafe_allow_html=True)
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
  y_pred_21 = convert_prediction(np.argmax(y_21, axis=1))
190
+ 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>"
191
+ st.markdown(styled_text, unsafe_allow_html=True)