Spaces:
Running
Running
File size: 1,233 Bytes
f7a0325 | 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 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()
|