From 8d3ae9f5a9bb63d6a516a5849557293931a33fd7 Mon Sep 17 00:00:00 2001 From: Lida Ostyakova Date: Tue, 12 Dec 2023 06:38:03 +0300 Subject: [PATCH] Style fix --- annotators/speech_function_classifier/models.py | 4 ++-- state_formatters/dp_formatters.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/annotators/speech_function_classifier/models.py b/annotators/speech_function_classifier/models.py index c977a17617..8dab78074e 100644 --- a/annotators/speech_function_classifier/models.py +++ b/annotators/speech_function_classifier/models.py @@ -6,14 +6,14 @@ def check_sfs(predicted_sf, previous_sf, current_speaker, previous_speaker): if predicted_sf == "Command": - if ("Open" in previous_sf or previous_sf is '') and current_speaker == previous_speaker: + if ("Open" in previous_sf or previous_sf is "") and current_speaker == previous_speaker: return "Open.Command" elif current_speaker == previous_speaker: return "Sustain.Continue.Command" else: return "React.Respond.Command" elif predicted_sf == "Engage": - if previous_sf is '': + if previous_sf is "": return "Open.Attend" else: return "React.Respond.Support.Engage" diff --git a/state_formatters/dp_formatters.py b/state_formatters/dp_formatters.py index d6b8343624..359ae8e6da 100755 --- a/state_formatters/dp_formatters.py +++ b/state_formatters/dp_formatters.py @@ -1183,7 +1183,6 @@ def speech_function_predictor_formatter(dialog: Dict): res = None try: res = dialog["human_utterances"][-1]["annotations"].get("speech_function_classifier", [""]) - # res = [item[0] for item in res] logger.info(f"formatter log sfp/sfc: {res}") except Exception as e: logger.error(f"Failed to format sfc output: {e}")