m7mdal7aj commited on
Commit
3689b26
1 Parent(s): f71dd25

Update my_model/utilities/state_manager.py

Browse files
my_model/utilities/state_manager.py CHANGED
@@ -6,8 +6,6 @@ from my_model.KBVQA import KBVQA, prepare_kbvqa_model
6
 
7
 
8
  class StateManager:
9
- # def __init__(self):
10
- # self.initialize_state()
11
 
12
  def initialize_state(self):
13
  if 'images_data' not in st.session_state:
@@ -38,7 +36,7 @@ class StateManager:
38
  st.table(pd.DataFrame(data))
39
 
40
  def display_session_state(self):
41
- st.write("### Current Model:")
42
  data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items()]
43
  df = pd.DataFrame(data)
44
  st.table(df)
@@ -52,7 +50,6 @@ class StateManager:
52
  st.text("AAAAAAA")
53
  st.session_state['kbvqa'].detection_confidence = st.session_state.confidence_level
54
  #self.update_model_settings(detection_model, confidence_level)
55
- st.text("Model is ready for inference.")
56
  # Update the previous state with current session state values
57
  st.session_state['previous_state'] = {'method': st.session_state.method, 'detection_model': st.session_state.detection_model, 'confidence_level': st.session_state.confidence_level}
58
 
 
6
 
7
 
8
  class StateManager:
 
 
9
 
10
  def initialize_state(self):
11
  if 'images_data' not in st.session_state:
 
36
  st.table(pd.DataFrame(data))
37
 
38
  def display_session_state(self):
39
+ st.write("Current Model:")
40
  data = [{'Key': key, 'Value': str(value)} for key, value in st.session_state.items()]
41
  df = pd.DataFrame(data)
42
  st.table(df)
 
50
  st.text("AAAAAAA")
51
  st.session_state['kbvqa'].detection_confidence = st.session_state.confidence_level
52
  #self.update_model_settings(detection_model, confidence_level)
 
53
  # Update the previous state with current session state values
54
  st.session_state['previous_state'] = {'method': st.session_state.method, 'detection_model': st.session_state.detection_model, 'confidence_level': st.session_state.confidence_level}
55