Spaces:
Sleeping
Sleeping
Commit
·
778b6ac
1
Parent(s):
a50bf3c
handle both ar and eng
Browse files
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.
|
71 |
final = "AI"
|
72 |
-
elif clf_score < 0.
|
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"
|