iyadalagha commited on
Commit
778b6ac
·
1 Parent(s): a50bf3c

handle both ar and eng

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,9 +67,9 @@ def detect(input_text: InputText):
67
 
68
  # Decision rule: combine both
69
  # Lower perplexity (<50) + high classifier_score (>0.7) = AI
70
- if clf_score > 0.7 and ppl < 50:
71
  final = "AI"
72
- elif clf_score < 0.3 and ppl > 80:
73
  final = "Human"
74
  else:
75
  final = "Uncertain"
 
67
 
68
  # Decision rule: combine both
69
  # Lower perplexity (<50) + high classifier_score (>0.7) = AI
70
+ if clf_score > 0.6 and ppl < 70:
71
  final = "AI"
72
+ elif clf_score < 0.4 and ppl > 60:
73
  final = "Human"
74
  else:
75
  final = "Uncertain"