m7mdal7aj commited on
Commit
ccdbda8
1 Parent(s): 2250430

Update my_model/state_manager.py

Browse files
Files changed (1) hide show
  1. my_model/state_manager.py +3 -2
my_model/state_manager.py CHANGED
@@ -16,6 +16,8 @@ class StateManager:
16
  self.col1, self.col2, self.col3 = st.columns([0.2, 0.6, 0.2])
17
 
18
  def initialize_state(self):
 
 
19
  if 'images_data' not in st.session_state:
20
  st.session_state['images_data'] = {}
21
  if 'kbvqa' not in st.session_state:
@@ -36,8 +38,7 @@ class StateManager:
36
  st.session_state['settings_changed'] = self.settings_changed
37
  if 'model_loaded' not in st.session_state:
38
  st.session_state['model_loaded'] = self.is_model_loaded
39
- if "previous_state" not in st.session_state:
40
- st.session_state['previous_state'] = {'method': None, 'detection_model': None, 'confidence_level': None}
41
 
42
 
43
 
 
16
  self.col1, self.col2, self.col3 = st.columns([0.2, 0.6, 0.2])
17
 
18
  def initialize_state(self):
19
+ if "previous_state" not in st.session_state:
20
+ st.session_state['previous_state'] = {'method': None, 'detection_model': None, 'confidence_level': None}
21
  if 'images_data' not in st.session_state:
22
  st.session_state['images_data'] = {}
23
  if 'kbvqa' not in st.session_state:
 
38
  st.session_state['settings_changed'] = self.settings_changed
39
  if 'model_loaded' not in st.session_state:
40
  st.session_state['model_loaded'] = self.is_model_loaded
41
+
 
42
 
43
 
44