Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def audit_florida_hb527(policy_text):
|
| 4 |
+
flags = []
|
| 5 |
+
|
| 6 |
+
# Florida House Bill / DOI Keywords for AI Transparency
|
| 7 |
+
if "automated decision" in policy_text.lower():
|
| 8 |
+
if "human review" not in policy_text.lower():
|
| 9 |
+
flags.append("🚨 VIOLATION: Automated decision mentioned without 'Human Review' option (HB 527).")
|
| 10 |
+
|
| 11 |
+
if "data sources" not in policy_text.lower():
|
| 12 |
+
flags.append("⚠️ Transparency Risk: External data sources not disclosed.")
|
| 13 |
+
|
| 14 |
+
if "genetic information" in policy_text.lower():
|
| 15 |
+
flags.append("🚨 PROHIBITED: Use of genetic data in Florida life insurance underwriting.")
|
| 16 |
+
|
| 17 |
+
if not flags:
|
| 18 |
+
return "✅ COMPLIANT: No immediate Florida Insurance Code violations detected."
|
| 19 |
+
else:
|
| 20 |
+
return "⚠️ COMPLIANCE ALERTS:\n" + "\n".join(flags)
|
| 21 |
+
|
| 22 |
+
iface = gr.Interface(
|
| 23 |
+
fn=audit_florida_hb527,
|
| 24 |
+
inputs=gr.Textbox(lines=10, placeholder="Paste Underwriting Algorithm Logic or Policy text..."),
|
| 25 |
+
outputs="text",
|
| 26 |
+
title="🐊 Florida AI Insurance Auditor (HB 527)",
|
| 27 |
+
description="Scans underwriting logic for violations of Florida Insurance Code & AI Transparency requirements."
|
| 28 |
+
)
|
| 29 |
+
iface.launch()
|