prakharg24 commited on
Commit
c04f062
·
verified ·
1 Parent(s): 6bbeeab

Update my_pages/information_loss.py

Browse files
Files changed (1) hide show
  1. my_pages/information_loss.py +11 -12
my_pages/information_loss.py CHANGED
@@ -65,7 +65,7 @@ def render():
65
  _ = st.button(feature[0], type="tertiary")
66
  else:
67
  if st.button(feature[0]):
68
- st.session_state.selected_features.extend(feature)
69
  st.session_state.show_message = feature[2]
70
  st.rerun()
71
 
@@ -77,16 +77,15 @@ def render():
77
  del st.session_state.show_message
78
 
79
  #### Selected features shown at the bottom
80
- st.markdown("---")
 
 
81
 
 
82
  st.markdown("**Set of Selected Features:**")
83
- if st.session_state.selected_features:
84
- col1, col2 = st.columns(2)
85
-
86
- for i, item in enumerate(st.session_state.selected_features):
87
- if i % 2 == 0:
88
- col1.markdown(f"- {item[1]}")
89
- else:
90
- col2.markdown(f"- {item[1]}")
91
- else:
92
- st.info("No features added yet. Click a feature above to add it to the dataset.")
 
65
  _ = st.button(feature[0], type="tertiary")
66
  else:
67
  if st.button(feature[0]):
68
+ st.session_state.selected_features.append(feature)
69
  st.session_state.show_message = feature[2]
70
  st.rerun()
71
 
 
77
  del st.session_state.show_message
78
 
79
  #### Selected features shown at the bottom
80
+ display_features_list = []
81
+ for ele in st.session_state.selected_features:
82
+ display_features_list.extend(ele[1])
83
 
84
+ st.markdown("---")
85
  st.markdown("**Set of Selected Features:**")
86
+ col1, col2 = st.columns(2)
87
+ for i, item in enumerate(display_features_list):
88
+ if i % 2 == 0:
89
+ col1.markdown(f"- {item[1]}")
90
+ else:
91
+ col2.markdown(f"- {item[1]}")