Spaces:
Sleeping
Sleeping
File size: 240 Bytes
5830944 |
1 2 3 4 5 6 7 |
def redaction_confidence(result: dict) -> float:
url = result.get("url","").lower()
score = 0.9
if "pdf" in url: score -= 0.3
if "redact" in url: score -= 0.4
if "download" in url: score -= 0.2
return max(0.0, score) |