|
|
import gradio as gr |
|
|
|
|
|
def audit_florida_hb527(policy_text): |
|
|
flags = [] |
|
|
|
|
|
|
|
|
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() |