Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,8 +42,8 @@ def detect_ai_text(text):
|
|
| 42 |
try:
|
| 43 |
score, entropy_score, ce_score = detector.compute_score(text)
|
| 44 |
|
| 45 |
-
# Based on the paper's findings, we use 0.
|
| 46 |
-
is_ai_generated = score < 0.
|
| 47 |
|
| 48 |
# Format the result with more detailed information
|
| 49 |
result = f"""
|
|
@@ -53,7 +53,7 @@ def detect_ai_text(text):
|
|
| 53 |
- **CE Score**: {ce_score:.4f}
|
| 54 |
|
| 55 |
### Interpretation
|
| 56 |
-
- **Threshold**: 0.
|
| 57 |
- **Current Score**: {score:.4f}
|
| 58 |
"""
|
| 59 |
if is_ai_generated:
|
|
|
|
| 42 |
try:
|
| 43 |
score, entropy_score, ce_score = detector.compute_score(text)
|
| 44 |
|
| 45 |
+
# Based on the paper's findings, we use 0.19 as the threshold
|
| 46 |
+
is_ai_generated = score < 0.19
|
| 47 |
|
| 48 |
# Format the result with more detailed information
|
| 49 |
result = f"""
|
|
|
|
| 53 |
- **CE Score**: {ce_score:.4f}
|
| 54 |
|
| 55 |
### Interpretation
|
| 56 |
+
- **Threshold**: 0.19 (scores below this are likely AI-generated)
|
| 57 |
- **Current Score**: {score:.4f}
|
| 58 |
"""
|
| 59 |
if is_ai_generated:
|