prakharg24 commited on
Commit
f1a9c5d
·
verified ·
1 Parent(s): ffa67bb

Update my_pages/information_loss.py

Browse files
Files changed (1) hide show
  1. my_pages/information_loss.py +16 -5
my_pages/information_loss.py CHANGED
@@ -22,6 +22,9 @@ def render():
22
  button[kind="primary"] {
23
  background: green!important;
24
  }
 
 
 
25
  </style>
26
  """,
27
  unsafe_allow_html=True,
@@ -62,7 +65,10 @@ def render():
62
  for feature in ALL_FEATURES.copy():
63
  if feature in st.session_state.selected_features:
64
  feature_name = feature[1]
65
- _ = st.button(feature_name, type="primary")
 
 
 
66
  else:
67
  feature_name = feature[0]
68
  if st.button(feature_name):
@@ -73,12 +79,17 @@ def render():
73
 
74
  # Centered message
75
  if "show_message" in st.session_state:
76
- st.markdown(
77
- f"<div style='text-align:center; color:#c0392b; font-weight:600; margin:14px 0;'>{st.session_state.show_message}</div>",
78
- unsafe_allow_html=True,
79
- )
80
  del st.session_state.show_message
81
 
 
 
 
 
 
 
 
 
 
82
  # st.markdown("---")
83
 
84
  # # Bottom half: dataset table
 
22
  button[kind="primary"] {
23
  background: green!important;
24
  }
25
+ button[kind="tertiary"] {
26
+ background: yellow!important;
27
+ }
28
  </style>
29
  """,
30
  unsafe_allow_html=True,
 
65
  for feature in ALL_FEATURES.copy():
66
  if feature in st.session_state.selected_features:
67
  feature_name = feature[1]
68
+ if feature[2] is None:
69
+ _ = st.button(feature_name, type="primary")
70
+ else:
71
+ _ = st.button(feature_name, type="tertiary")
72
  else:
73
  feature_name = feature[0]
74
  if st.button(feature_name):
 
79
 
80
  # Centered message
81
  if "show_message" in st.session_state:
 
 
 
 
82
  del st.session_state.show_message
83
 
84
+ # st.markdown(
85
+ # f"<div style='text-align:center; color:#c0392b; font-weight:600; margin:14px 0;'>{st.session_state.show_message}</div>",
86
+ # unsafe_allow_html=True,
87
+ # )
88
+ with st.modal("Notice"):
89
+ st.write("This is your message inside a modal pop-up.")
90
+ if st.button("OK"):
91
+ st.rerun()
92
+
93
  # st.markdown("---")
94
 
95
  # # Bottom half: dataset table