minko186 commited on
Commit
7c7ccca
·
1 Parent(s): b96ba8b

added yellow to highlighter + adjusted thresholds

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -173,8 +173,10 @@ def detection_polygraf(text, model="BC Original"):
173
  for sentence in temp_sentences:
174
  if scores[i]:
175
  avg_score = sum(scores[i]) / len(scores[i])
176
- if avg_score >= 0.65:
177
  colored_sentence = f"<span style='background-color:red;'>{sentence}</span>"
 
 
178
  else:
179
  colored_sentence = sentence
180
  colored_sentences.append(colored_sentence)
 
173
  for sentence in temp_sentences:
174
  if scores[i]:
175
  avg_score = sum(scores[i]) / len(scores[i])
176
+ if avg_score >= 0.70:
177
  colored_sentence = f"<span style='background-color:red;'>{sentence}</span>"
178
+ elif avg_score >= 0.55:
179
+ colored_sentence = f"<span style='background-color:GoldenRod;'>{sentence}</span>"
180
  else:
181
  colored_sentence = sentence
182
  colored_sentences.append(colored_sentence)