Update my_model/state_manager.py
Browse files
my_model/state_manager.py
CHANGED
@@ -156,7 +156,7 @@ class StateManager:
|
|
156 |
|
157 |
free_gpu_resources()
|
158 |
|
159 |
-
if
|
160 |
del st.session_state['kbvqa']
|
161 |
st.write('Model deleted')
|
162 |
free_gpu_resources()
|
|
|
156 |
|
157 |
free_gpu_resources()
|
158 |
|
159 |
+
if self.is_model_loaded():
|
160 |
del st.session_state['kbvqa']
|
161 |
st.write('Model deleted')
|
162 |
free_gpu_resources()
|