Spaces:
Sleeping
Sleeping
Update my_model/utilities/state_manager.py
Browse files
my_model/utilities/state_manager.py
CHANGED
|
@@ -68,14 +68,9 @@ class StateManager:
|
|
| 68 |
# Function to check if any session state values have changed
|
| 69 |
def has_state_changed(self):
|
| 70 |
for key in st.session_state['previous_state']:
|
| 71 |
-
st.write(st.session_state[key])
|
| 72 |
-
st.write(st.session_state['previous_state'][key])
|
| 73 |
if st.session_state[key] != st.session_state['previous_state'][key]:
|
| 74 |
-
st.text("found a change")
|
| 75 |
-
st.write(st.session_state[key])
|
| 76 |
-
st.write(st.session_state['previous_state'][key])
|
| 77 |
return True # Found a change
|
| 78 |
-
|
| 79 |
|
| 80 |
def get_model(self):
|
| 81 |
"""Retrieve the KBVQA model from the session state."""
|
|
|
|
| 68 |
# Function to check if any session state values have changed
|
| 69 |
def has_state_changed(self):
|
| 70 |
for key in st.session_state['previous_state']:
|
|
|
|
|
|
|
| 71 |
if st.session_state[key] != st.session_state['previous_state'][key]:
|
|
|
|
|
|
|
|
|
|
| 72 |
return True # Found a change
|
| 73 |
+
else: return False # No changes found
|
| 74 |
|
| 75 |
def get_model(self):
|
| 76 |
"""Retrieve the KBVQA model from the session state."""
|