Spaces:
Sleeping
Sleeping
Test assertion provided
Browse files
app.py
CHANGED
|
@@ -25,9 +25,11 @@ def classify_text(text):
|
|
| 25 |
for pred in [roberta_base_pred, chatgpt_lli_hc3_pred, chatgpt_roberta_pred]:
|
| 26 |
if pred == 1:
|
| 27 |
votes["AI"] += 1
|
| 28 |
-
|
| 29 |
votes["Human"] += 1
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
# Determine final decision based on majority
|
| 32 |
if votes["AI"] > votes["Human"]:
|
| 33 |
return "AI"
|
|
|
|
| 25 |
for pred in [roberta_base_pred, chatgpt_lli_hc3_pred, chatgpt_roberta_pred]:
|
| 26 |
if pred == 1:
|
| 27 |
votes["AI"] += 1
|
| 28 |
+
elif pred == 0:
|
| 29 |
votes["Human"] += 1
|
| 30 |
+
else:
|
| 31 |
+
raise AssertionError("A problem exists with the code.")
|
| 32 |
+
|
| 33 |
# Determine final decision based on majority
|
| 34 |
if votes["AI"] > votes["Human"]:
|
| 35 |
return "AI"
|