Update my_pages/information_loss.py
Browse files- my_pages/information_loss.py +12 -3
my_pages/information_loss.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import pandas as pd
|
| 2 |
import streamlit as st
|
|
|
|
| 3 |
from utils import go_to
|
| 4 |
|
| 5 |
ALL_FEATURES = [
|
|
@@ -33,11 +34,12 @@ def render():
|
|
| 33 |
Consider the automation of loan approval using AI models. <br>
|
| 34 |
Choose the features below that you would like to collect to train your AI model. <br><br>
|
| 35 |
</div>
|
| 36 |
-
---
|
| 37 |
""",
|
| 38 |
unsafe_allow_html=True
|
| 39 |
)
|
| 40 |
|
|
|
|
|
|
|
| 41 |
# Session state init
|
| 42 |
# if "available_features" not in st.session_state:
|
| 43 |
# st.session_state.available_features = ALL_FEATURES.copy()
|
|
@@ -61,10 +63,17 @@ def render():
|
|
| 61 |
for feature in ALL_FEATURES.copy():
|
| 62 |
if feature in st.session_state.selected_features:
|
| 63 |
feature_name = feature[1]
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
else:
|
| 66 |
feature_name = feature[0]
|
| 67 |
-
if st.button(feature_name
|
| 68 |
st.session_state.selected_features.append(feature)
|
| 69 |
if feature[2] is not None:
|
| 70 |
st.session_state.show_message = (feature[2])
|
|
|
|
| 1 |
import pandas as pd
|
| 2 |
import streamlit as st
|
| 3 |
+
from streamlit_extras.stylable_container import stylable_container
|
| 4 |
from utils import go_to
|
| 5 |
|
| 6 |
ALL_FEATURES = [
|
|
|
|
| 34 |
Consider the automation of loan approval using AI models. <br>
|
| 35 |
Choose the features below that you would like to collect to train your AI model. <br><br>
|
| 36 |
</div>
|
|
|
|
| 37 |
""",
|
| 38 |
unsafe_allow_html=True
|
| 39 |
)
|
| 40 |
|
| 41 |
+
st.markdown("---")
|
| 42 |
+
|
| 43 |
# Session state init
|
| 44 |
# if "available_features" not in st.session_state:
|
| 45 |
# st.session_state.available_features = ALL_FEATURES.copy()
|
|
|
|
| 63 |
for feature in ALL_FEATURES.copy():
|
| 64 |
if feature in st.session_state.selected_features:
|
| 65 |
feature_name = feature[1]
|
| 66 |
+
with stylable_container(
|
| 67 |
+
feature_name,
|
| 68 |
+
css_styles=f"""
|
| 69 |
+
button {{
|
| 70 |
+
background: green!important;
|
| 71 |
+
}}""",
|
| 72 |
+
):
|
| 73 |
+
_ = st.button(feature_name, type="selected")
|
| 74 |
else:
|
| 75 |
feature_name = feature[0]
|
| 76 |
+
if st.button(feature_name):
|
| 77 |
st.session_state.selected_features.append(feature)
|
| 78 |
if feature[2] is not None:
|
| 79 |
st.session_state.show_message = (feature[2])
|