Update my_model/state_manager.py
Browse files
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 |
-
|
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 |
|