Spaces:
Runtime error
Runtime error
modifying the prediction view
Browse files
app.py
CHANGED
|
@@ -466,10 +466,8 @@ if st.button('Generate Predictions'):
|
|
| 466 |
df_modelpred=pd.DataFrame(list(zip(chars, sel_var_values)), columns=["Number of Characters", "Target_Rate"])
|
| 467 |
# st.checkbox("Use container width", value=False, key="use_container_width")
|
| 468 |
# st.dataframe(df_modelpred.style.highlight_max(axis=0), use_container_width=st.session_state.use_container_width)
|
| 469 |
-
df_modelpred.sort_values(by='Target_Rate',inplace = True)
|
| 470 |
-
|
| 471 |
-
return ['background-color:yellow'] * len(row) if row.Target_Rate ==df_modelpred['Target_Rate'][0] else ['background-color:yellow'] * len(row)
|
| 472 |
-
st.dataframe(df_modelpred.style.apply(color_coding, axis=1))
|
| 473 |
|
| 474 |
if len(chars) > 1:
|
| 475 |
#fig = plt.figure()
|
|
|
|
| 466 |
df_modelpred=pd.DataFrame(list(zip(chars, sel_var_values)), columns=["Number of Characters", "Target_Rate"])
|
| 467 |
# st.checkbox("Use container width", value=False, key="use_container_width")
|
| 468 |
# st.dataframe(df_modelpred.style.highlight_max(axis=0), use_container_width=st.session_state.use_container_width)
|
| 469 |
+
df_modelpred.sort_values(by='Target_Rate', ascending=False, inplace = True)
|
| 470 |
+
st.dataframe(df_modelpred)
|
|
|
|
|
|
|
| 471 |
|
| 472 |
if len(chars) > 1:
|
| 473 |
#fig = plt.figure()
|