Skip to content

Commit

Permalink
Fix: Minor bug in mean calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anindyadeep committed Nov 14, 2023
1 parent 03edce8 commit 0800a6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepeval/metrics/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def neural_toxic_score(
else:
detoxify_model = Detoxify("original", device=device)
toxicity_score_dict = detoxify_model.predict(prediction)
mean_toxicity_score = list(toxicity_score_dict.values()) / len(
mean_toxicity_score = sum(list(toxicity_score_dict.values())) / len(
toxicity_score_dict
)
return mean_toxicity_score, toxicity_score_dict

0 comments on commit 0800a6c

Please sign in to comment.