File size: 1,205 Bytes
a36eff7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import gradio as gr

def audit_florida_hb527(policy_text):
    flags = []
    
    # Florida House Bill / DOI Keywords for AI Transparency
    if "automated decision" in policy_text.lower():
        if "human review" not in policy_text.lower():
            flags.append("🚨 VIOLATION: Automated decision mentioned without 'Human Review' option (HB 527).")
    
    if "data sources" not in policy_text.lower():
        flags.append("⚠️ Transparency Risk: External data sources not disclosed.")
        
    if "genetic information" in policy_text.lower():
        flags.append("🚨 PROHIBITED: Use of genetic data in Florida life insurance underwriting.")

    if not flags:
        return "✅ COMPLIANT: No immediate Florida Insurance Code violations detected."
    else:
        return "⚠️ COMPLIANCE ALERTS:\n" + "\n".join(flags)

iface = gr.Interface(
    fn=audit_florida_hb527,
    inputs=gr.Textbox(lines=10, placeholder="Paste Underwriting Algorithm Logic or Policy text..."),
    outputs="text",
    title="🐊 Florida AI Insurance Auditor (HB 527)",
    description="Scans underwriting logic for violations of Florida Insurance Code & AI Transparency requirements."
)
iface.launch()