AndySAnker commited on
Commit
c4b55e5
1 Parent(s): 18f8a31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -78,9 +78,11 @@ def POMPredicter(POMFinder, Gr, y_onehotenc_cat):
78
  y_pred_proba = y_pred_proba[:,1];
79
  res = sorted(range(len(y_pred_proba)), key = lambda sub: y_pred_proba[sub]);
80
  res.reverse();
 
81
  st.write(y_onehotenc_cat.categories_)
82
  st.write(y_onehotenc_cat.categories_[0])
83
  st.write(y_onehotenc_cat.categories_[0][res[0]])
 
84
  st.markdown(f'<span style="font-size: 24px; color: green;">The 1st guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[0]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[0]]:.2f} %</span> <hr/>',unsafe_allow_html=True)
85
  st.markdown(f'<span style="font-size: 24px; color: green;">The 2nd guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[1]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[1]]:.2f} %</span> <hr/>',unsafe_allow_html=True)
86
  st.markdown(f'<span style="font-size: 24px; color: green;">The 3rd guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[2]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[2]]:.2f} %</span> <hr/>',unsafe_allow_html=True)
 
78
  y_pred_proba = y_pred_proba[:,1];
79
  res = sorted(range(len(y_pred_proba)), key = lambda sub: y_pred_proba[sub]);
80
  res.reverse();
81
+ st.write(res)
82
  st.write(y_onehotenc_cat.categories_)
83
  st.write(y_onehotenc_cat.categories_[0])
84
  st.write(y_onehotenc_cat.categories_[0][res[0]])
85
+ st.write(y_pred_proba)
86
  st.markdown(f'<span style="font-size: 24px; color: green;">The 1st guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[0]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[0]]:.2f} %</span> <hr/>',unsafe_allow_html=True)
87
  st.markdown(f'<span style="font-size: 24px; color: green;">The 2nd guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[1]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[1]]:.2f} %</span> <hr/>',unsafe_allow_html=True)
88
  st.markdown(f'<span style="font-size: 24px; color: green;">The 3rd guess from the model is: <b>{str(y_onehotenc_cat.categories_[0][res[2]])[2:-2]+"cale.xyz"}</b> with a probability of {y_pred_proba[res[2]]:.2f} %</span> <hr/>',unsafe_allow_html=True)