Spaces:
Sleeping
Sleeping
Deploy ReguAI: Neuro-Symbolic AI GRC & Automated Conformity Assessment Engine
Browse files- app.py +151 -119
- data/active_learning_triplets.jsonl +1 -0
app.py
CHANGED
|
@@ -720,6 +720,76 @@ button[variant="primary"]:hover {
|
|
| 720 |
color: #cbd5e1 !important;
|
| 721 |
border-color: #334155 !important;
|
| 722 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 723 |
"""
|
| 724 |
|
| 725 |
with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
@@ -753,19 +823,11 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 753 |
"""
|
| 754 |
)
|
| 755 |
|
| 756 |
-
with gr.
|
| 757 |
# =============================================================
|
| 758 |
-
#
|
| 759 |
# =============================================================
|
| 760 |
-
with gr.
|
| 761 |
-
gr.HTML("<div class='section-label'>β‘ 1-Click Quick Scenarios</div>")
|
| 762 |
-
with gr.Row():
|
| 763 |
-
preset_samd = gr.Button("π₯ Medical SaMD", size="sm", elem_classes=["preset-btn"])
|
| 764 |
-
preset_hr = gr.Button("πΌ Failed HR AI", size="sm", elem_classes=["preset-btn"])
|
| 765 |
-
preset_prohibited = gr.Button("π« Prohibited AI", size="sm", elem_classes=["preset-btn"])
|
| 766 |
-
preset_gpai = gr.Button("π Frontier GPAI", size="sm", elem_classes=["preset-btn"])
|
| 767 |
-
preset_grid = gr.Button("β‘ Smart Grid", size="sm", elem_classes=["preset-btn"])
|
| 768 |
-
|
| 769 |
with gr.Row():
|
| 770 |
domain_dropdown = gr.Dropdown(
|
| 771 |
label="π Regulatory Sector",
|
|
@@ -787,21 +849,13 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 787 |
label="Statutory Summary",
|
| 788 |
)
|
| 789 |
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
value=DEFAULT_SPEC_TEXT,
|
| 797 |
-
)
|
| 798 |
-
with gr.TabItem("π EUR-Lex Legal Factsheet"):
|
| 799 |
-
factsheet_box = gr.HTML(
|
| 800 |
-
value=DEFAULT_FACTSHEET,
|
| 801 |
-
label="Regulatory Factsheet & Provenance",
|
| 802 |
-
)
|
| 803 |
|
| 804 |
-
# Collapsible settings for decluttering secondary inputs
|
| 805 |
with gr.Accordion("βοΈ Corporate Exposure & Auditor Settings (Optional)", open=False):
|
| 806 |
with gr.Row():
|
| 807 |
turnover_input = gr.Number(
|
|
@@ -823,43 +877,37 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 823 |
info="Embedded into W3C PROV-O digital ledger",
|
| 824 |
)
|
| 825 |
|
| 826 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 827 |
|
| 828 |
# =============================================================
|
| 829 |
-
#
|
| 830 |
# =============================================================
|
| 831 |
-
with gr.
|
| 832 |
with gr.Tabs():
|
| 833 |
-
|
| 834 |
-
with gr.TabItem("βοΈ Conformity Proofs & Fines"):
|
| 835 |
-
exec_output = gr.HTML(value=DEFAULT_ASSESSMENT[0], label="Executive Summary")
|
| 836 |
-
fine_liability_output = gr.HTML(value=DEFAULT_ASSESSMENT[11], label="Article 99 Fine Liability")
|
| 837 |
-
violations_table = gr.Dataframe(
|
| 838 |
-
headers=["Legal Article", "Normative Requirement", "Severity", "SHACL Path", "Remediation Guidance"],
|
| 839 |
-
datatype=["str", "str", "str", "str", "str"],
|
| 840 |
-
value=DEFAULT_ASSESSMENT[1],
|
| 841 |
-
label="Mathematical Proof: Non-Conformities Found",
|
| 842 |
-
)
|
| 843 |
-
|
| 844 |
-
# TAB 2: GRAPH & CROSSWALK
|
| 845 |
-
with gr.TabItem("πΈοΈ Regulatory Graph & Crosswalk"):
|
| 846 |
graph_output = gr.HTML(value=DEFAULT_ASSESSMENT[3], label="Force-Directed Knowledge Graph")
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
value=DEFAULT_ASSESSMENT[10],
|
| 852 |
-
label="Harmonized Multi-Framework Controls",
|
| 853 |
)
|
| 854 |
-
|
| 855 |
-
# TAB 3: CLAIMS & ACTIVE LEARNING
|
| 856 |
-
with gr.TabItem("π Claims & Active Learning Triage"):
|
| 857 |
claims_table = gr.Dataframe(
|
| 858 |
headers=["Claim ID", "Category", "Status", "Confidence", "Target Article", "Evidence Span"],
|
| 859 |
datatype=["str", "str", "str", "str", "str", "str"],
|
| 860 |
value=DEFAULT_ASSESSMENT[2],
|
| 861 |
label="Extracted Regulatory Claims",
|
| 862 |
)
|
|
|
|
| 863 |
gr.Markdown("### π€ Borderline Claims Requiring Human Auditor Review")
|
| 864 |
borderline_table = gr.Dataframe(
|
| 865 |
headers=["Claim ID", "Category", "Status", "Confidence", "Evidence Quote"],
|
|
@@ -874,31 +922,52 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 874 |
triage_notes = gr.Textbox(label="Auditor Rationale", placeholder="Explain reason for modification...", scale=8)
|
| 875 |
triage_btn = gr.Button("Submit Triplet", scale=4)
|
| 876 |
triage_result = gr.Markdown()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 877 |
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 902 |
exec_output,
|
| 903 |
violations_table,
|
| 904 |
claims_table,
|
|
@@ -915,33 +984,6 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 915 |
sarif_display,
|
| 916 |
]
|
| 917 |
|
| 918 |
-
# Wire 1-Click Preset Scenario Buttons
|
| 919 |
-
preset_samd.click(
|
| 920 |
-
fn=lambda a, t, s: load_preset_and_assess(0, 0, a, t, s),
|
| 921 |
-
inputs=[auditor_input, turnover_input, is_sme_input],
|
| 922 |
-
outputs=preset_outputs,
|
| 923 |
-
)
|
| 924 |
-
preset_hr.click(
|
| 925 |
-
fn=lambda a, t, s: load_preset_and_assess(1, 0, a, t, s),
|
| 926 |
-
inputs=[auditor_input, turnover_input, is_sme_input],
|
| 927 |
-
outputs=preset_outputs,
|
| 928 |
-
)
|
| 929 |
-
preset_prohibited.click(
|
| 930 |
-
fn=lambda a, t, s: load_preset_and_assess(8, 1, a, t, s),
|
| 931 |
-
inputs=[auditor_input, turnover_input, is_sme_input],
|
| 932 |
-
outputs=preset_outputs,
|
| 933 |
-
)
|
| 934 |
-
preset_gpai.click(
|
| 935 |
-
fn=lambda a, t, s: load_preset_and_assess(7, 0, a, t, s),
|
| 936 |
-
inputs=[auditor_input, turnover_input, is_sme_input],
|
| 937 |
-
outputs=preset_outputs,
|
| 938 |
-
)
|
| 939 |
-
preset_grid.click(
|
| 940 |
-
fn=lambda a, t, s: load_preset_and_assess(4, 0, a, t, s),
|
| 941 |
-
inputs=[auditor_input, turnover_input, is_sme_input],
|
| 942 |
-
outputs=preset_outputs,
|
| 943 |
-
)
|
| 944 |
-
|
| 945 |
# Wire cascading dropdown event handlers
|
| 946 |
domain_dropdown.change(
|
| 947 |
fn=on_domain_change,
|
|
@@ -954,26 +996,16 @@ with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
| 954 |
outputs=[spec_input, quick_bar_box, factsheet_box],
|
| 955 |
)
|
| 956 |
|
| 957 |
-
# Wire
|
| 958 |
assess_btn.click(
|
| 959 |
fn=run_assessment,
|
| 960 |
-
inputs=
|
| 961 |
-
outputs=
|
| 962 |
-
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
ledger_display,
|
| 968 |
-
jsonld_display,
|
| 969 |
-
report_markdown,
|
| 970 |
-
cert_html_output,
|
| 971 |
-
borderline_table,
|
| 972 |
-
frameworks_table,
|
| 973 |
-
fine_liability_output,
|
| 974 |
-
bom_display,
|
| 975 |
-
sarif_display,
|
| 976 |
-
],
|
| 977 |
)
|
| 978 |
|
| 979 |
triage_btn.click(
|
|
|
|
| 720 |
color: #cbd5e1 !important;
|
| 721 |
border-color: #334155 !important;
|
| 722 |
}
|
| 723 |
+
|
| 724 |
+
/* -------------------------------------------------------------
|
| 725 |
+
WORKFLOW TABS (Top-Level)
|
| 726 |
+
------------------------------------------------------------- */
|
| 727 |
+
#main-tabs > div[role="tablist"],
|
| 728 |
+
.main-workflow-tabs > div[role="tablist"] {
|
| 729 |
+
display: flex !important;
|
| 730 |
+
gap: 8px !important;
|
| 731 |
+
background: #f1f5f9 !important;
|
| 732 |
+
padding: 6px !important;
|
| 733 |
+
border-radius: 12px !important;
|
| 734 |
+
border: 1px solid #e2e8f0 !important;
|
| 735 |
+
margin-bottom: 20px !important;
|
| 736 |
+
}
|
| 737 |
+
|
| 738 |
+
.dark #main-tabs > div[role="tablist"],
|
| 739 |
+
.dark .main-workflow-tabs > div[role="tablist"] {
|
| 740 |
+
background: #0f172a !important;
|
| 741 |
+
border-color: #334155 !important;
|
| 742 |
+
}
|
| 743 |
+
|
| 744 |
+
#main-tabs > div[role="tablist"] > button[role="tab"],
|
| 745 |
+
.main-workflow-tabs > div[role="tablist"] > button[role="tab"] {
|
| 746 |
+
flex: 1 !important;
|
| 747 |
+
font-size: 14px !important;
|
| 748 |
+
font-weight: 700 !important;
|
| 749 |
+
padding: 12px 18px !important;
|
| 750 |
+
border-radius: 8px !important;
|
| 751 |
+
color: #475569 !important;
|
| 752 |
+
border: none !important;
|
| 753 |
+
text-align: center !important;
|
| 754 |
+
background: transparent !important;
|
| 755 |
+
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
.dark #main-tabs > div[role="tablist"] > button[role="tab"],
|
| 759 |
+
.dark .main-workflow-tabs > div[role="tablist"] > button[role="tab"] {
|
| 760 |
+
color: #94a3b8 !important;
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
#main-tabs > div[role="tablist"] > button[role="tab"]:hover,
|
| 764 |
+
.main-workflow-tabs > div[role="tablist"] > button[role="tab"]:hover {
|
| 765 |
+
color: #0f172a !important;
|
| 766 |
+
background: rgba(255, 255, 255, 0.6) !important;
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
.dark #main-tabs > div[role="tablist"] > button[role="tab"]:hover,
|
| 770 |
+
.dark .main-workflow-tabs > div[role="tablist"] > button[role="tab"]:hover {
|
| 771 |
+
color: #f8fafc !important;
|
| 772 |
+
background: rgba(30, 41, 59, 0.8) !important;
|
| 773 |
+
}
|
| 774 |
+
|
| 775 |
+
#main-tabs > div[role="tablist"] > button[role="tab"][aria-selected="true"],
|
| 776 |
+
#main-tabs > div[role="tablist"] > button[role="tab"].selected,
|
| 777 |
+
.main-workflow-tabs > div[role="tablist"] > button[role="tab"][aria-selected="true"],
|
| 778 |
+
.main-workflow-tabs > div[role="tablist"] > button[role="tab"].selected {
|
| 779 |
+
background: #ffffff !important;
|
| 780 |
+
color: #2563eb !important;
|
| 781 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
|
| 782 |
+
border-bottom: none !important;
|
| 783 |
+
}
|
| 784 |
+
|
| 785 |
+
.dark #main-tabs > div[role="tablist"] > button[role="tab"][aria-selected="true"],
|
| 786 |
+
.dark #main-tabs > div[role="tablist"] > button[role="tab"].selected,
|
| 787 |
+
.dark .main-workflow-tabs > div[role="tablist"] > button[role="tab"][aria-selected="true"],
|
| 788 |
+
.dark .main-workflow-tabs > div[role="tablist"] > button[role="tab"].selected {
|
| 789 |
+
background: #1e293b !important;
|
| 790 |
+
color: #60a5fa !important;
|
| 791 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
|
| 792 |
+
}
|
| 793 |
"""
|
| 794 |
|
| 795 |
with gr.Blocks(title="ReguAI: Neuro-Symbolic AI GRC Engine") as demo:
|
|
|
|
| 823 |
"""
|
| 824 |
)
|
| 825 |
|
| 826 |
+
with gr.Tabs(elem_id="main-tabs", elem_classes=["main-workflow-tabs"]) as main_tabs:
|
| 827 |
# =============================================================
|
| 828 |
+
# TAB 1: 1οΈβ£ Select Scenario
|
| 829 |
# =============================================================
|
| 830 |
+
with gr.TabItem("1οΈβ£ Select Scenario", id="tab_select_scenario"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 831 |
with gr.Row():
|
| 832 |
domain_dropdown = gr.Dropdown(
|
| 833 |
label="π Regulatory Sector",
|
|
|
|
| 849 |
label="Statutory Summary",
|
| 850 |
)
|
| 851 |
|
| 852 |
+
spec_input = gr.Textbox(
|
| 853 |
+
label="System Technical Specification (Markdown or JSON - Fully Editable)",
|
| 854 |
+
lines=14,
|
| 855 |
+
placeholder="Paste AI system architecture or model card text...",
|
| 856 |
+
value=DEFAULT_SPEC_TEXT,
|
| 857 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 858 |
|
|
|
|
| 859 |
with gr.Accordion("βοΈ Corporate Exposure & Auditor Settings (Optional)", open=False):
|
| 860 |
with gr.Row():
|
| 861 |
turnover_input = gr.Number(
|
|
|
|
| 877 |
info="Embedded into W3C PROV-O digital ledger",
|
| 878 |
)
|
| 879 |
|
| 880 |
+
with gr.Row():
|
| 881 |
+
assess_btn = gr.Button("β‘ Run Deterministic Conformity Assessment", variant="primary", size="lg")
|
| 882 |
+
|
| 883 |
+
gr.HTML(
|
| 884 |
+
"""
|
| 885 |
+
<div style="font-size: 13px; color: #64748b; margin-top: 12px; text-align: center; padding: 10px; background: rgba(0,0,0,0.02); border-radius: 8px;">
|
| 886 |
+
π‘ Select a sector and case study above, adjust specifications or turnover if needed, and click <strong>Run Deterministic Conformity Assessment</strong>. Switch to tabs <strong>2οΈβ£ Review Grounding</strong>, <strong>3οΈβ£ Run SHACL Proofs</strong>, and <strong>4οΈβ£ Export Annex IV Package</strong> to inspect the results.
|
| 887 |
+
</div>
|
| 888 |
+
"""
|
| 889 |
+
)
|
| 890 |
|
| 891 |
# =============================================================
|
| 892 |
+
# TAB 2: 2οΈβ£ Review Grounding
|
| 893 |
# =============================================================
|
| 894 |
+
with gr.TabItem("2οΈβ£ Review Grounding", id="tab_review_grounding"):
|
| 895 |
with gr.Tabs():
|
| 896 |
+
with gr.TabItem("πΈοΈ Knowledge Graph & Ontology"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 897 |
graph_output = gr.HTML(value=DEFAULT_ASSESSMENT[3], label="Force-Directed Knowledge Graph")
|
| 898 |
+
with gr.TabItem("π EUR-Lex Legal Factsheet"):
|
| 899 |
+
factsheet_box = gr.HTML(
|
| 900 |
+
value=DEFAULT_FACTSHEET,
|
| 901 |
+
label="Regulatory Factsheet & Provenance",
|
|
|
|
|
|
|
| 902 |
)
|
| 903 |
+
with gr.TabItem("π Extracted Claims"):
|
|
|
|
|
|
|
| 904 |
claims_table = gr.Dataframe(
|
| 905 |
headers=["Claim ID", "Category", "Status", "Confidence", "Target Article", "Evidence Span"],
|
| 906 |
datatype=["str", "str", "str", "str", "str", "str"],
|
| 907 |
value=DEFAULT_ASSESSMENT[2],
|
| 908 |
label="Extracted Regulatory Claims",
|
| 909 |
)
|
| 910 |
+
with gr.TabItem("π€ Active Learning Triage Queue"):
|
| 911 |
gr.Markdown("### π€ Borderline Claims Requiring Human Auditor Review")
|
| 912 |
borderline_table = gr.Dataframe(
|
| 913 |
headers=["Claim ID", "Category", "Status", "Confidence", "Evidence Quote"],
|
|
|
|
| 922 |
triage_notes = gr.Textbox(label="Auditor Rationale", placeholder="Explain reason for modification...", scale=8)
|
| 923 |
triage_btn = gr.Button("Submit Triplet", scale=4)
|
| 924 |
triage_result = gr.Markdown()
|
| 925 |
+
with gr.TabItem("π Multi-Framework Crosswalk"):
|
| 926 |
+
gr.Markdown("### πͺπΊ EU AI Act β· NIST AI RMF 1.0 β· ISO/IEC 42001:2023 β· GDPR Crosswalk")
|
| 927 |
+
frameworks_table = gr.Dataframe(
|
| 928 |
+
headers=["Target Framework", "Control ID", "Control Name", "Status", "Linked AI Act Article", "Audit Guidance"],
|
| 929 |
+
datatype=["str", "str", "str", "str", "str", "str"],
|
| 930 |
+
value=DEFAULT_ASSESSMENT[10],
|
| 931 |
+
label="Harmonized Multi-Framework Controls",
|
| 932 |
+
)
|
| 933 |
|
| 934 |
+
# =============================================================
|
| 935 |
+
# TAB 3: 3οΈβ£ Run SHACL Proofs
|
| 936 |
+
# =============================================================
|
| 937 |
+
with gr.TabItem("3οΈβ£ Run SHACL Proofs", id="tab_run_shacl_proofs"):
|
| 938 |
+
with gr.Row():
|
| 939 |
+
assess_btn_tab3 = gr.Button("β‘ Re-Run Deterministic Conformity Proofs", variant="primary", size="md")
|
| 940 |
+
exec_output = gr.HTML(value=DEFAULT_ASSESSMENT[0], label="Executive Summary")
|
| 941 |
+
fine_liability_output = gr.HTML(value=DEFAULT_ASSESSMENT[11], label="Article 99 Fine Liability")
|
| 942 |
+
violations_table = gr.Dataframe(
|
| 943 |
+
headers=["Legal Article", "Normative Requirement", "Severity", "SHACL Path", "Remediation Guidance"],
|
| 944 |
+
datatype=["str", "str", "str", "str", "str"],
|
| 945 |
+
value=DEFAULT_ASSESSMENT[1],
|
| 946 |
+
label="Mathematical Proof: Non-Conformities Found",
|
| 947 |
+
)
|
| 948 |
+
|
| 949 |
+
# =============================================================
|
| 950 |
+
# TAB 4: 4οΈβ£ Export Annex IV Package
|
| 951 |
+
# =============================================================
|
| 952 |
+
with gr.TabItem("4οΈβ£ Export Annex IV Package", id="tab_export_annex_iv"):
|
| 953 |
+
with gr.Tabs():
|
| 954 |
+
with gr.TabItem("π Attestation Certificate (HTML)"):
|
| 955 |
+
cert_html_output = gr.HTML(value=DEFAULT_ASSESSMENT[8])
|
| 956 |
+
with gr.TabItem("π¦ CycloneDX 1.6 AI-BOM"):
|
| 957 |
+
bom_display = gr.Code(value=DEFAULT_ASSESSMENT[12], language="json", label="CycloneDX 1.6 Machine-Readable AI-BOM")
|
| 958 |
+
with gr.TabItem("π‘οΈ OASIS SARIF 2.1.0 Report"):
|
| 959 |
+
sarif_display = gr.Code(value=DEFAULT_ASSESSMENT[13], language="json", label="OASIS SARIF 2.1.0 Static Analysis Report")
|
| 960 |
+
with gr.TabItem("π Annex IV Report (Markdown)"):
|
| 961 |
+
report_markdown = gr.Markdown(value=DEFAULT_ASSESSMENT[7])
|
| 962 |
+
with gr.TabItem("π Machine-Readable JSON-LD"):
|
| 963 |
+
jsonld_display = gr.Code(value=DEFAULT_ASSESSMENT[6], language="json", label="W3C JSON-LD Digital Certificate")
|
| 964 |
+
with gr.TabItem("π W3C PROV-O Ledger"):
|
| 965 |
+
token_display = gr.Textbox(value=DEFAULT_ASSESSMENT[4], label="Official Digital Conformity Token", interactive=False)
|
| 966 |
+
ledger_display = gr.Markdown(value=DEFAULT_ASSESSMENT[5])
|
| 967 |
+
|
| 968 |
+
# Assessment outputs list (14 components)
|
| 969 |
+
assessment_inputs = [spec_input, auditor_input, turnover_input, is_sme_input]
|
| 970 |
+
assessment_outputs = [
|
| 971 |
exec_output,
|
| 972 |
violations_table,
|
| 973 |
claims_table,
|
|
|
|
| 984 |
sarif_display,
|
| 985 |
]
|
| 986 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 987 |
# Wire cascading dropdown event handlers
|
| 988 |
domain_dropdown.change(
|
| 989 |
fn=on_domain_change,
|
|
|
|
| 996 |
outputs=[spec_input, quick_bar_box, factsheet_box],
|
| 997 |
)
|
| 998 |
|
| 999 |
+
# Wire assessment buttons (Tab 1 primary and Tab 3 re-run)
|
| 1000 |
assess_btn.click(
|
| 1001 |
fn=run_assessment,
|
| 1002 |
+
inputs=assessment_inputs,
|
| 1003 |
+
outputs=assessment_outputs,
|
| 1004 |
+
)
|
| 1005 |
+
assess_btn_tab3.click(
|
| 1006 |
+
fn=run_assessment,
|
| 1007 |
+
inputs=assessment_inputs,
|
| 1008 |
+
outputs=assessment_outputs,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1009 |
)
|
| 1010 |
|
| 1011 |
triage_btn.click(
|
data/active_learning_triplets.jsonl
CHANGED
|
@@ -21,3 +21,4 @@
|
|
| 21 |
{"timestamp": "2026-09-21T14:47:50.118531+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
| 22 |
{"timestamp": "2026-09-21T14:48:40.951594+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
| 23 |
{"timestamp": "2026-09-21T15:05:44.655438+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
|
|
|
|
|
| 21 |
{"timestamp": "2026-09-21T14:47:50.118531+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
| 22 |
{"timestamp": "2026-09-21T14:48:40.951594+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
| 23 |
{"timestamp": "2026-09-21T15:05:44.655438+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|
| 24 |
+
{"timestamp": "2026-09-21T15:15:16.103685+00:00", "auditor_id": "compliance_lead_01", "claim_id": "clm_test_99", "anchor_text": "Verified operational override in production dashboard.", "positive_label": "HUMAN_OVERSIGHT", "negative_label": "IRRELEVANT_TEXT", "verified_assertion_status": "IMPLEMENTED", "auditor_notes": "Verified operational override in production dashboard."}
|