diff --git a/packages/pds/src/labeler/hive.ts b/packages/pds/src/labeler/hive.ts index a60ee5a7a80..41bddf572a4 100644 --- a/packages/pds/src/labeler/hive.ts +++ b/packages/pds/src/labeler/hive.ts @@ -151,6 +151,8 @@ const labelForClass = { very_bloody: 'gore', human_corpse: 'corpse', hanging: 'corpse', +} +const labelForClassLessSensitive = { yes_self_harm: 'self-harm', } @@ -161,6 +163,11 @@ export const summarizeLabels = (classes: HiveRespClass[]): string[] => { labels.push(labelForClass[cls.class]) } } + for (const cls of classes) { + if (labelForClassLessSensitive[cls.class] && cls.score >= 0.96) { + labels.push(labelForClassLessSensitive[cls.class]) + } + } return labels }