Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -84,7 +84,7 @@ class InferenceRunner(StateManager):
|
|
84 |
nested_col21, nested_col22 = st.columns([0.65, 0.35])
|
85 |
image_for_display = self.resize_image(image_data['image'], 600)
|
86 |
nested_col21.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
|
87 |
-
if not image_data['analysis_done'] or self.settings_changed: # if not done analysis before or even done but settings changed, then we need to analyze again
|
88 |
nested_col22.text("Please click 'Analyze Image'..")
|
89 |
free_gpu_resources()
|
90 |
with nested_col22:
|
@@ -100,6 +100,8 @@ class InferenceRunner(StateManager):
|
|
100 |
|
101 |
if image_data['analysis_done']:
|
102 |
free_gpu_resources()
|
|
|
|
|
103 |
st.session_state['loading_in_progress'] = False
|
104 |
sample_questions = config.SAMPLE_QUESTIONS.get(image_key, [])
|
105 |
selected_question = nested_col22.selectbox(
|
|
|
84 |
nested_col21, nested_col22 = st.columns([0.65, 0.35])
|
85 |
image_for_display = self.resize_image(image_data['image'], 600)
|
86 |
nested_col21.image(image_for_display, caption=f'Uploaded Image: {image_key[-11:]}')
|
87 |
+
if not image_data['analysis_done'] or self.settings_changed or st.session_state['confidence_level_changed']: # if not done analysis before or even done but settings changed, then we need to analyze again
|
88 |
nested_col22.text("Please click 'Analyze Image'..")
|
89 |
free_gpu_resources()
|
90 |
with nested_col22:
|
|
|
100 |
|
101 |
if image_data['analysis_done']:
|
102 |
free_gpu_resources()
|
103 |
+
if st.session_state['confidence_level_changed']:
|
104 |
+
nested_col22.warning("Confidence level changed, please click analyze again.")
|
105 |
st.session_state['loading_in_progress'] = False
|
106 |
sample_questions = config.SAMPLE_QUESTIONS.get(image_key, [])
|
107 |
selected_question = nested_col22.selectbox(
|