m7mdal7aj commited on
Commit
b7c642c
1 Parent(s): dc9ee8f

Update my_model/utilities/state_manager.py

Browse files
my_model/utilities/state_manager.py CHANGED
@@ -17,6 +17,8 @@ class StateManager:
17
  st.session_state['button_label'] = "Load Model"
18
  if "previous_state" not in st.session_state:
19
  st.session_state['previous_state'] = {}
 
 
20
 
21
 
22
 
@@ -31,10 +33,6 @@ class StateManager:
31
  return st.slider(text, min_value, max_value, value, step, key=slider_key_name)
32
 
33
 
34
- def check_settings_changed(self, current_selected_method, current_detection_model, current_confidence_level):
35
- return (st.session_state['model_settings']['detection_model'] != current_detection_model or
36
- st.session_state['model_settings']['confidence_level'] != current_confidence_level or
37
- st.session_state['model_settings']['selected_method'] != current_selected_method)
38
 
39
  def display_model_settings(self):
40
  st.write("#### Current Model Settings:")
 
17
  st.session_state['button_label'] = "Load Model"
18
  if "previous_state" not in st.session_state:
19
  st.session_state['previous_state'] = {}
20
+ if "settings_changed" not in st.session_state:
21
+ st.session_state['settings_changed'] = False
22
 
23
 
24
 
 
33
  return st.slider(text, min_value, max_value, value, step, key=slider_key_name)
34
 
35
 
 
 
 
 
36
 
37
  def display_model_settings(self):
38
  st.write("#### Current Model Settings:")