ikarasz commited on
Commit
c1fe34c
·
1 Parent(s): f453042

fix on-task label string (LABEL_1 -> on_task)

Browse files

The model's config.json defines a real id2label mapping
({"0": "off_task", "1": "on_task"}), so transformers.pipeline
returns "on_task"/"off_task", not the generic "LABEL_1"/"LABEL_0"
fallback used when no id2label is present. The placeholder
comparison against 'LABEL_1' never matched, so mathWord was always
False (0 utterances flagged instead of the ~75 the vocabulary
approach found).

Files changed (1) hide show
  1. measures/OnTaskAnalyser.py +1 -1
measures/OnTaskAnalyser.py CHANGED
@@ -1,7 +1,7 @@
1
  from transformers import pipeline
2
 
3
  ON_TASK_MODEL = 'edsi-umd/on-task-bert'
4
- ON_TASK_LABEL = 'LABEL_1' # TODO: confirm against a real inference call before relying on this
5
 
6
 
7
  class OnTaskAnalyser:
 
1
  from transformers import pipeline
2
 
3
  ON_TASK_MODEL = 'edsi-umd/on-task-bert'
4
+ ON_TASK_LABEL = 'on_task' # from the model's config.json id2label: {"0": "off_task", "1": "on_task"}
5
 
6
 
7
  class OnTaskAnalyser: