Update my_model/utilities/st_utils.py
Browse files
my_model/utilities/st_utils.py
CHANGED
@@ -105,6 +105,10 @@ class StateManager:
|
|
105 |
df = pd.DataFrame(data)
|
106 |
st.table(df)
|
107 |
|
|
|
|
|
|
|
|
|
108 |
def is_model_loaded(self):
|
109 |
return 'kbvqa' in st.session_state and st.session_state['kbvqa'] is not None
|
110 |
|
|
|
105 |
df = pd.DataFrame(data)
|
106 |
st.table(df)
|
107 |
|
108 |
+
def get_model(self):
|
109 |
+
"""Retrieve the KBVQA model from the session state."""
|
110 |
+
return st.session_state.get('kbvqa', None)
|
111 |
+
|
112 |
def is_model_loaded(self):
|
113 |
return 'kbvqa' in st.session_state and st.session_state['kbvqa'] is not None
|
114 |
|