Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,8 +34,13 @@ def check_plagiarism(text):
|
|
| 34 |
|
| 35 |
# Use SynthID's bayesian detector to check for AI generation likelihood
|
| 36 |
try:
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
return "Flagged as AI-generated content (Academic Integrity Warning)."
|
| 40 |
else:
|
| 41 |
return "Content appears to be human-generated."
|
|
|
|
| 34 |
|
| 35 |
# Use SynthID's bayesian detector to check for AI generation likelihood
|
| 36 |
try:
|
| 37 |
+
# Assuming the logits processor can be used to score watermarked content
|
| 38 |
+
logits_scores = logits_processor(tokens['input_ids'])
|
| 39 |
+
|
| 40 |
+
# Simple threshold: assuming logits indicate watermark presence
|
| 41 |
+
is_watermarked = logits_scores.mean().item() > 0.5
|
| 42 |
+
|
| 43 |
+
if is_watermarked:
|
| 44 |
return "Flagged as AI-generated content (Academic Integrity Warning)."
|
| 45 |
else:
|
| 46 |
return "Content appears to be human-generated."
|