m7mdal7aj commited on
Commit
77e6994
·
verified ·
1 Parent(s): 756ae8a

Update my_model/utilities/state_manager.py

Browse files
my_model/utilities/state_manager.py CHANGED
@@ -13,7 +13,7 @@ class StateManager:
13
  if 'kbvqa' not in st.session_state:
14
  st.session_state['kbvqa'] = None
15
  if "button_lablel" not in st.session_state:
16
- st.session_state['kbvqa'] = "Load Model"
17
  if "previous_state" not in st.session_state:
18
  st.session_state['previous_state'] = {}
19
 
@@ -39,7 +39,7 @@ class StateManager:
39
  st.write("#### Current Model Settings:")
40
  data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items() if key in ["confidence_level", 'detection_model', 'method', 'kbvqa']]
41
  df = pd.DataFrame(data)
42
- styled_df = df.style.set_properties(**{'background-color': 'black', 'color': 'white', 'border-color': 'white'}).set_table_styles([{'selector': 'th','props': [('background-color', 'gray'), ('font-weight', 'bold')]}])
43
  st.table(styled_df)
44
 
45
  def display_session_state(self):
 
13
  if 'kbvqa' not in st.session_state:
14
  st.session_state['kbvqa'] = None
15
  if "button_lablel" not in st.session_state:
16
+ st.session_state['button_lablel'] = "Load Model"
17
  if "previous_state" not in st.session_state:
18
  st.session_state['previous_state'] = {}
19
 
 
39
  st.write("#### Current Model Settings:")
40
  data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items() if key in ["confidence_level", 'detection_model', 'method', 'kbvqa']]
41
  df = pd.DataFrame(data)
42
+ styled_df = df.style.set_properties(**{'background-color': 'black', 'color': 'white', 'border-color': 'white'}).set_table_styles([{'selector': 'th','props': [('background-color', 'white'), ('font-weight', 'bold')]}])
43
  st.table(styled_df)
44
 
45
  def display_session_state(self):