Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lida Ostyakova committed Dec 12, 2023
1 parent 8d668bb commit 8d3ae9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions annotators/speech_function_classifier/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion state_formatters/dp_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 8d3ae9f

Please sign in to comment.