m7mdal7aj commited on
Commit
726be01
1 Parent(s): b85f89f

Update my_model/state_manager.py

Browse files
Files changed (1) hide show
  1. my_model/state_manager.py +1 -2
my_model/state_manager.py CHANGED
@@ -294,7 +294,6 @@ class StateManager:
294
  img = copy.deepcopy(image)
295
  st.text("Analyzing the image .. ")
296
  caption = st.session_state['kbvqa'].get_caption(img)
297
- st.write("analyze func", st.session_state['kbvqa'].detection_confidence)
298
  image_with_boxes, detected_objects_str = st.session_state['kbvqa'].detect_objects(img)
299
 
300
  return caption, detected_objects_str, image_with_boxes
@@ -333,7 +332,7 @@ class StateManager:
333
  detected_objects_str (str): String representation of detected objects.
334
  analysis_done (bool): Flag indicating if analysis of the image is complete.
335
  """
336
- if image_key in st.session_state['images_data'] or st.session_state["confidence_level_changed"]:
337
  st.session_state['images_data'][image_key].update({
338
  'caption': caption,
339
  'detected_objects_str': detected_objects_str,
 
294
  img = copy.deepcopy(image)
295
  st.text("Analyzing the image .. ")
296
  caption = st.session_state['kbvqa'].get_caption(img)
 
297
  image_with_boxes, detected_objects_str = st.session_state['kbvqa'].detect_objects(img)
298
 
299
  return caption, detected_objects_str, image_with_boxes
 
332
  detected_objects_str (str): String representation of detected objects.
333
  analysis_done (bool): Flag indicating if analysis of the image is complete.
334
  """
335
+ if image_key in st.session_state['images_data']:
336
  st.session_state['images_data'][image_key].update({
337
  'caption': caption,
338
  'detected_objects_str': detected_objects_str,