m7mdal7aj commited on
Commit
3c11450
·
verified ·
1 Parent(s): ccdbda8

Update my_model/state_manager.py

Browse files
Files changed (1) hide show
  1. my_model/state_manager.py +7 -0
my_model/state_manager.py CHANGED
@@ -18,6 +18,12 @@ class StateManager:
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:
@@ -40,6 +46,7 @@ class StateManager:
40
  st.session_state['model_loaded'] = self.is_model_loaded
41
 
42
 
 
43
 
44
 
45
 
 
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 'method' not in st.session_state:
22
+ st.session_state['method'] = None
23
+ if 'method' not in st.session_state:
24
+ st.session_state['confidence_level'] = None
25
+ if 'method' not in st.session_state:
26
+ st.session_state['detection_model'] = None
27
  if 'images_data' not in st.session_state:
28
  st.session_state['images_data'] = {}
29
  if 'kbvqa' not in st.session_state:
 
46
  st.session_state['model_loaded'] = self.is_model_loaded
47
 
48
 
49
+
50
 
51
 
52