m7mdal7aj commited on
Commit
8624b37
1 Parent(s): 7e798e5

Update my_model/state_manager.py

Browse files
Files changed (1) hide show
  1. my_model/state_manager.py +5 -2
my_model/state_manager.py CHANGED
@@ -38,8 +38,7 @@ class StateManager:
38
  st.session_state['force_reload_button_clicked'] = False
39
  if 'time_taken_to_load_model' not in st.session_state:
40
  st.session_state['time_taken_to_load_model'] = None
41
- if 'confidence_level_changed' not in st.session_state:
42
- st.session_state['confidence_level_changed'] = False
43
  if "settings_changed" not in st.session_state:
44
  st.session_state['settings_changed'] = self.settings_changed
45
  if 'model_loaded' not in st.session_state:
@@ -105,6 +104,10 @@ class StateManager:
105
  bool: True if any setting has changed, False otherwise.
106
  """
107
  return self.has_state_changed()
 
 
 
 
108
 
109
  @property
110
  def display_model_settings(self):
 
38
  st.session_state['force_reload_button_clicked'] = False
39
  if 'time_taken_to_load_model' not in st.session_state:
40
  st.session_state['time_taken_to_load_model'] = None
41
+
 
42
  if "settings_changed" not in st.session_state:
43
  st.session_state['settings_changed'] = self.settings_changed
44
  if 'model_loaded' not in st.session_state:
 
104
  bool: True if any setting has changed, False otherwise.
105
  """
106
  return self.has_state_changed()
107
+
108
+ @property
109
+ def confidance_change(self):
110
+ return st.session_state["confidence_level"] != st.session_state["previous_state"]["confidence_level"]
111
 
112
  @property
113
  def display_model_settings(self):