Update my_model/tabs/run_inference.py
Browse files
my_model/tabs/run_inference.py
CHANGED
@@ -101,7 +101,7 @@ class InferenceRunner(StateManager):
|
|
101 |
|
102 |
|
103 |
def process_question(self, image_key, question, image_data, nested_col22):
|
104 |
-
|
105 |
if question and (question not in [q for q, _, _ in qa_history] or self.settings_changed or self.confidance_change):
|
106 |
if nested_col22.button('Get Answer', key=f'answer_{image_key}', disabled=self.is_widget_disabled):
|
107 |
answer, prompt_length = self.answer_question(image_data['caption'], image_data['detected_objects_str'], question)
|
|
|
101 |
|
102 |
|
103 |
def process_question(self, image_key, question, image_data, nested_col22):
|
104 |
+
qa_history = image_data.get('qa_history', [])
|
105 |
if question and (question not in [q for q, _, _ in qa_history] or self.settings_changed or self.confidance_change):
|
106 |
if nested_col22.button('Get Answer', key=f'answer_{image_key}', disabled=self.is_widget_disabled):
|
107 |
answer, prompt_length = self.answer_question(image_data['caption'], image_data['detected_objects_str'], question)
|