m7mdal7aj commited on
Commit
a4bcb09
1 Parent(s): 802de9d

Update my_model/state_manager.py

Browse files
Files changed (1) hide show
  1. my_model/state_manager.py +1 -1
my_model/state_manager.py CHANGED
@@ -156,7 +156,7 @@ class StateManager:
156
 
157
  free_gpu_resources()
158
 
159
- if st.session_state['kbvqa'] is not None:
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()