Spaces:
Sleeping
Sleeping
richardChenzhihui commited on
Commit ·
7f92df6
1
Parent(s): 46d4744
fix: use 0.15 as AI detection threshold in demo
Browse files
app.py
CHANGED
|
@@ -179,8 +179,8 @@ def detect_ai_text(text):
|
|
| 179 |
|
| 180 |
score, entropy_score, ce_score = detector.compute_score(text)
|
| 181 |
|
| 182 |
-
#
|
| 183 |
-
is_ai_generated = score < 0.
|
| 184 |
|
| 185 |
# Format the result with more detailed information
|
| 186 |
result = f"""
|
|
@@ -190,7 +190,7 @@ def detect_ai_text(text):
|
|
| 190 |
- **CE Score**: {ce_score:.4f}
|
| 191 |
|
| 192 |
### Interpretation
|
| 193 |
-
- **Threshold**: 0.
|
| 194 |
- **Current Score**: {score:.4f}
|
| 195 |
"""
|
| 196 |
if is_ai_generated:
|
|
|
|
| 179 |
|
| 180 |
score, entropy_score, ce_score = detector.compute_score(text)
|
| 181 |
|
| 182 |
+
# Threshold for AI vs human (demo setting)
|
| 183 |
+
is_ai_generated = score < 0.15
|
| 184 |
|
| 185 |
# Format the result with more detailed information
|
| 186 |
result = f"""
|
|
|
|
| 190 |
- **CE Score**: {ce_score:.4f}
|
| 191 |
|
| 192 |
### Interpretation
|
| 193 |
+
- **Threshold**: 0.15 (scores below this are likely AI-generated)
|
| 194 |
- **Current Score**: {score:.4f}
|
| 195 |
"""
|
| 196 |
if is_ai_generated:
|