Radianis
Add LBW Guard Colab Space
f7a0325
from __future__ import annotations
from pathlib import Path
import gradio as gr
ROOT = Path(__file__).resolve().parent
EASY_NOTEBOOK = ROOT / "LBW_Guard_Easy_Test_COLAB.ipynb"
ABLATION_NOTEBOOK = ROOT / "LBW_Guard_Ablation_Test_COLAB.ipynb"
INTRO = """
# LBW Guard Colab Tests
Download a notebook, open it in Google Colab, set the runtime to GPU, and run the cells top to bottom.
The notebooks install `LBW-Guard` and public dependencies at runtime. They do not import local source folders.
"""
EASY_DETAILS = """
## Easy Test
Fast customer smoke test with one AdamW run and one `lbw_guard` run.
"""
ABLATION_DETAILS = """
## Ablation Test
Scenario matrix with AdamW as baseline, `lbw_guard` comparison, metrics CSV, and gains CSV.
"""
with gr.Blocks(title="LBW Guard Colab Tests") as demo:
gr.Markdown(INTRO)
with gr.Row():
with gr.Column():
gr.Markdown(EASY_DETAILS)
gr.File(value=str(EASY_NOTEBOOK), label="LBW Guard Easy Test Colab", interactive=False)
with gr.Column():
gr.Markdown(ABLATION_DETAILS)
gr.File(value=str(ABLATION_NOTEBOOK), label="LBW Guard Ablation Test Colab", interactive=False)
if __name__ == "__main__":
demo.launch()