import gradio as gr import json import time # Load sealed results with open("results.json") as f: data = json.load(f) def simulate_epochs(dataset): results = data[dataset] header = "| Epoch | LIAM (RFT) | Adam | Lion | SGR |\n|-------|-------------|------|------|-----|\n" table = header for i in range(len(results["epochs"])): epoch = results["epochs"][i] rft = results["LIAM_RFT"][i] adam = results["Adam"][i] lion = results["Lion"][i] sgr = results["SGR"][i] table += f"| {epoch} | {rft:.2f}% | {adam:.2f}% | {lion:.2f}% | {sgr:.2f}% |\n" yield table time.sleep(0.75) # Simulate live epoch progression demo = gr.Interface( fn=simulate_epochs, inputs=gr.Dropdown(choices=list(data.keys()), label="Select Dataset"), outputs=gr.Markdown(), title="RFT Optimizer Showdown", description="Live epoch simulation comparing DCLR++ (LIAM RFT) vs. Adam, Lion, and SGR. All results sealed. No code exposed.", live=True ) demo.launch()