Spaces:
Running
Running
Update my_model/state_manager.py
Browse files
my_model/state_manager.py
CHANGED
@@ -202,7 +202,7 @@ class StateManager:
|
|
202 |
if key == 'confidence_level':
|
203 |
continue # confidence_level tracker is separate
|
204 |
if key in st.session_state and st.session_state[key] != st.session_state['previous_state'][key]:
|
205 |
-
|
206 |
return True # Found a change
|
207 |
else: return False # No changes found
|
208 |
|
@@ -298,8 +298,7 @@ class StateManager:
|
|
298 |
st.text("Analyzing the image .. please wait")
|
299 |
caption = st.session_state['kbvqa'].get_caption(img)
|
300 |
image_with_boxes, detected_objects_str = st.session_state['kbvqa'].detect_objects(img)
|
301 |
-
|
302 |
-
st.write(detected_objects_str)
|
303 |
return caption, detected_objects_str, image_with_boxes
|
304 |
|
305 |
|
|
|
202 |
if key == 'confidence_level':
|
203 |
continue # confidence_level tracker is separate
|
204 |
if key in st.session_state and st.session_state[key] != st.session_state['previous_state'][key]:
|
205 |
+
|
206 |
return True # Found a change
|
207 |
else: return False # No changes found
|
208 |
|
|
|
298 |
st.text("Analyzing the image .. please wait")
|
299 |
caption = st.session_state['kbvqa'].get_caption(img)
|
300 |
image_with_boxes, detected_objects_str = st.session_state['kbvqa'].detect_objects(img)
|
301 |
+
free_gpu_resources()
|
|
|
302 |
return caption, detected_objects_str, image_with_boxes
|
303 |
|
304 |
|