Spaces:
Sleeping
Sleeping
Create reports/explainability.py
Browse files- reports/explainability.py +6 -15
reports/explainability.py
CHANGED
|
@@ -1,23 +1,14 @@
|
|
| 1 |
def explainability_report(results):
|
| 2 |
agencies = {r["agency"] for r in results}
|
| 3 |
-
exemptions = set()
|
| 4 |
-
|
| 5 |
-
for r in results:
|
| 6 |
-
exemptions |= set(classify_exemptions(r["snippet"])["codes"])
|
| 7 |
-
|
| 8 |
return f"""
|
| 9 |
-
|
| 10 |
|
| 11 |
-
**Purpose:** Public FOIA
|
| 12 |
-
**
|
| 13 |
-
**Agencies Covered:** {', '.join(agencies)}
|
| 14 |
|
| 15 |
-
|
| 16 |
- Robots.txt enforcement
|
| 17 |
-
-
|
| 18 |
- Redaction detection
|
| 19 |
-
-
|
| 20 |
-
|
| 21 |
-
### FOIA Exemptions Detected
|
| 22 |
-
{', '.join(exemptions) or 'None'}
|
| 23 |
"""
|
|
|
|
| 1 |
def explainability_report(results):
|
| 2 |
agencies = {r["agency"] for r in results}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
return f"""
|
| 4 |
+
### Explainability Report
|
| 5 |
|
| 6 |
+
**Purpose:** Public FOIA discovery
|
| 7 |
+
**Agencies:** {', '.join(agencies)}
|
|
|
|
| 8 |
|
| 9 |
+
Safeguards:
|
| 10 |
- Robots.txt enforcement
|
| 11 |
+
- Kill switches
|
| 12 |
- Redaction detection
|
| 13 |
+
- FOIA exemption surfacing
|
|
|
|
|
|
|
|
|
|
| 14 |
"""
|