Spaces:
Runtime error
Runtime error
Commit
·
8bb4ab4
1
Parent(s):
cee0410
ordering the metrics
Browse files- demo_watermark.py +4 -1
demo_watermark.py
CHANGED
|
@@ -295,7 +295,10 @@ def list_format_scores(score_dict, detection_threshold):
|
|
| 295 |
lst_2d.append([format_names(k), ("Watermarked" if v else "Human/Unwatermarked")])
|
| 296 |
else:
|
| 297 |
lst_2d.append([format_names(k), f"{v}"])
|
| 298 |
-
|
|
|
|
|
|
|
|
|
|
| 299 |
return lst_2d
|
| 300 |
|
| 301 |
def detect(input_text, args, device=None, tokenizer=None):
|
|
|
|
| 295 |
lst_2d.append([format_names(k), ("Watermarked" if v else "Human/Unwatermarked")])
|
| 296 |
else:
|
| 297 |
lst_2d.append([format_names(k), f"{v}"])
|
| 298 |
+
if "confidence" in score_dict:
|
| 299 |
+
lst_2d.insert(-2,["z-score Threshold", f"{detection_threshold}"])
|
| 300 |
+
else:
|
| 301 |
+
lst_2d.insert(-1,["z-score Threshold", f"{detection_threshold}"])
|
| 302 |
return lst_2d
|
| 303 |
|
| 304 |
def detect(input_text, args, device=None, tokenizer=None):
|