JustKiddo commited on
Commit
b2c04a4
·
verified ·
1 Parent(s): 0cd0b89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ class ContentFilter:
20
  'sexist', 'homophobic', 'transphobic'
21
  ]
22
 
23
- def filter_toxicity(self, text, toxicity_threshold=0.7):
24
  """
25
  Detect toxic content using pre-trained model
26
 
@@ -120,7 +120,7 @@ def respond(
120
 
121
  # Add toxicity details
122
  for category, score in toxicity_details.items():
123
- if score > 0.7:
124
  warning_message += f"{category} (Score: {score:.2f}), "
125
 
126
  # Add blacklisted keywords
 
20
  'sexist', 'homophobic', 'transphobic'
21
  ]
22
 
23
+ def filter_toxicity(self, text, toxicity_threshold=0.5):
24
  """
25
  Detect toxic content using pre-trained model
26
 
 
120
 
121
  # Add toxicity details
122
  for category, score in toxicity_details.items():
123
+ if score > 0.5:
124
  warning_message += f"{category} (Score: {score:.2f}), "
125
 
126
  # Add blacklisted keywords