diff --git a/ammico/display.py b/ammico/display.py index b916dbf..5b860a7 100644 --- a/ammico/display.py +++ b/ammico/display.py @@ -100,6 +100,7 @@ class AnalysisExplorer: State("Dropdown_select_Detector", "value"), State("Dropdown_analysis_type", "value"), State("textarea_questions", "value"), + State("setting_Text_analyse_text", "value"), State("setting_privacy_env_var", "value"), State("setting_Emotion_emotion_threshold", "value"), State("setting_Emotion_race_threshold", "value"), @@ -465,6 +466,7 @@ class AnalysisExplorer: detector_value: str, analysis_type_value: str, textarea_questions_value: str, + settings_text_analyse_text: list, setting_privacy_env_var: str, setting_emotion_emotion_threshold: int, setting_emotion_race_threshold: int, @@ -519,8 +521,12 @@ class AnalysisExplorer: identify_function = identify_dict[detector_value] if detector_value == "TextDetector": + analyse_text = ( + True if settings_text_analyse_text == ["Analyse text"] else False + ) detector_class = identify_function( image_copy, + analyse_text=analyse_text, accept_privacy=( setting_privacy_env_var if setting_privacy_env_var diff --git a/ammico/test/test_display.py b/ammico/test/test_display.py index d7241a2..3cdb333 100644 --- a/ammico/test/test_display.py +++ b/ammico/test/test_display.py @@ -50,6 +50,9 @@ def test_right_output_analysis_emotions(get_AE, get_options, monkeypatch): get_options[3], get_options[0], "EmotionDetector", + "summary", + "Some question", + True, "SOME_VAR", 50, 50,