import gradio as gr SAMPLE_LEDGER = """| Claim ID | Claim | Source | Gate Status | |---|---|---|---| | CL-001 | Example market signal is cited from a registered source entry. | S1 | pass | | CL-002 | Example risk statement is framed with explicit limitation. | S2 | warning | | CL-003 | Example unsupported claim is blocked before delivery. | none | block | """ SAMPLE_BRIEF = """# Example BriefLoop Output ## Executive Summary This is a public-safe demo of the BriefLoop workflow shape. It shows how a brief can carry a claim ledger, quality gates, and audit-oriented records. ## What This Demo Shows - Claims are recorded before delivery. - Warnings and blockers are visible. - Reader-facing output is separate from audit/control artifacts. ## Boundary This demo does not prove semantic truth and does not run the full multi-agent workflow inside this Space. """ SAMPLE_GATES = """| Gate | Result | Note | |---|---|---| | reader-clean | pass | No process residue in reader-facing output. | | unsupported-material-claim | block | Unsupported material claim must be repaired or removed. | | source-appendix | warning | Source metadata can be improved. | """ def show_demo(selection: str): if selection == "Claim Ledger": return SAMPLE_LEDGER if selection == "Quality Gates": return SAMPLE_GATES return SAMPLE_BRIEF with gr.Blocks(title="BriefLoop Demo") as demo: gr.Markdown( """ # BriefLoop Demo BriefLoop is an open-source workflow for accountable AI-assisted business briefings. This Space is a bounded product demo. It shows the shape of BriefLoop artifacts, not a live proof of semantic truth or output quality. """ ) view = gr.Radio( ["Final Brief", "Claim Ledger", "Quality Gates"], value="Final Brief", label="Choose a demo artifact", ) output = gr.Markdown() view.change(show_demo, inputs=view, outputs=output) demo.load(show_demo, inputs=view, outputs=output) gr.Markdown( """ Links: [Website](https://briefloop.ai) · [GitHub](https://github.com/Stahl-G/briefloop) · [PyPI](https://pypi.org/project/briefloop/) """ ) if __name__ == "__main__": demo.launch()