Update my_model/state_manager.py
Browse files
my_model/state_manager.py
CHANGED
@@ -31,7 +31,7 @@ class StateManager:
|
|
31 |
if 'force_reload_button_clicked' not in st.session_state:
|
32 |
st.session_state['force_reload_button_clicked'] = False
|
33 |
if 'time_taken_to_load_model' not in st.session_state:
|
34 |
-
st.session_state['time_taken_to_load_model'] =
|
35 |
if "settings_changed" not in st.session_state:
|
36 |
st.session_state['settings_changed'] = self.settings_changed
|
37 |
if 'model_loaded' not in st.session_state:
|
@@ -291,8 +291,10 @@ class StateManager:
|
|
291 |
"""
|
292 |
img = copy.deepcopy(image)
|
293 |
st.text("Analyzing the image .. ")
|
294 |
-
caption = st.session_state
|
295 |
-
|
|
|
|
|
296 |
return caption, detected_objects_str, image_with_boxes
|
297 |
|
298 |
|
|
|
31 |
if 'force_reload_button_clicked' not in st.session_state:
|
32 |
st.session_state['force_reload_button_clicked'] = False
|
33 |
if 'time_taken_to_load_model' not in st.session_state:
|
34 |
+
st.session_state['time_taken_to_load_model'] = None
|
35 |
if "settings_changed" not in st.session_state:
|
36 |
st.session_state['settings_changed'] = self.settings_changed
|
37 |
if 'model_loaded' not in st.session_state:
|
|
|
291 |
"""
|
292 |
img = copy.deepcopy(image)
|
293 |
st.text("Analyzing the image .. ")
|
294 |
+
caption = st.session_state['kbvqa'].get_caption(img)
|
295 |
+
st.text("DDDDDDDDD")
|
296 |
+
image_with_boxes, detected_objects_str = self.session_state['kbvqa'].detect_objects(img)
|
297 |
+
st.text("TTTTTT")
|
298 |
return caption, detected_objects_str, image_with_boxes
|
299 |
|
300 |
|