Skip to content

Commit

Permalink
auto-label: less sensitive for some classes (bluesky-social#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold authored May 18, 2023
1 parent cf36b36 commit d878564
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/pds/src/labeler/hive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ const labelForClass = {
very_bloody: 'gore',
human_corpse: 'corpse',
hanging: 'corpse',
}
const labelForClassLessSensitive = {
yes_self_harm: 'self-harm',
}

Expand All @@ -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
}

Expand Down

0 comments on commit d878564

Please sign in to comment.