Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,14 +2,14 @@ import gradio as gr
|
|
| 2 |
import json
|
| 3 |
import time
|
| 4 |
|
| 5 |
-
# Load results
|
| 6 |
with open("results.json") as f:
|
| 7 |
data = json.load(f)
|
| 8 |
|
| 9 |
def simulate_epochs(dataset):
|
| 10 |
results = data[dataset]
|
| 11 |
-
|
| 12 |
-
|
| 13 |
for i in range(len(results["epochs"])):
|
| 14 |
epoch = results["epochs"][i]
|
| 15 |
rft = results["LIAM_RFT"][i]
|
|
@@ -17,16 +17,15 @@ def simulate_epochs(dataset):
|
|
| 17 |
lion = results["Lion"][i]
|
| 18 |
sgr = results["SGR"][i]
|
| 19 |
table += f"| {epoch} | {rft:.2f}% | {adam:.2f}% | {lion:.2f}% | {sgr:.2f}% |\n"
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
time.sleep(0.75)
|
| 23 |
|
| 24 |
demo = gr.Interface(
|
| 25 |
fn=simulate_epochs,
|
| 26 |
inputs=gr.Dropdown(choices=list(data.keys()), label="Select Dataset"),
|
| 27 |
outputs=gr.Markdown(),
|
| 28 |
title="RFT Optimizer Showdown",
|
| 29 |
-
description="
|
| 30 |
live=True
|
| 31 |
)
|
| 32 |
|
|
|
|
| 2 |
import json
|
| 3 |
import time
|
| 4 |
|
| 5 |
+
# Load sealed results
|
| 6 |
with open("results.json") as f:
|
| 7 |
data = json.load(f)
|
| 8 |
|
| 9 |
def simulate_epochs(dataset):
|
| 10 |
results = data[dataset]
|
| 11 |
+
header = "| Epoch | LIAM (RFT) | Adam | Lion | SGR |\n|-------|-------------|------|------|-----|\n"
|
| 12 |
+
table = header
|
| 13 |
for i in range(len(results["epochs"])):
|
| 14 |
epoch = results["epochs"][i]
|
| 15 |
rft = results["LIAM_RFT"][i]
|
|
|
|
| 17 |
lion = results["Lion"][i]
|
| 18 |
sgr = results["SGR"][i]
|
| 19 |
table += f"| {epoch} | {rft:.2f}% | {adam:.2f}% | {lion:.2f}% | {sgr:.2f}% |\n"
|
| 20 |
+
yield table
|
| 21 |
+
time.sleep(0.75) # Simulate live epoch progression
|
|
|
|
| 22 |
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=simulate_epochs,
|
| 25 |
inputs=gr.Dropdown(choices=list(data.keys()), label="Select Dataset"),
|
| 26 |
outputs=gr.Markdown(),
|
| 27 |
title="RFT Optimizer Showdown",
|
| 28 |
+
description="Live epoch simulation comparing DCLR++ (LIAM RFT) vs. Adam, Lion, and SGR. All results sealed. No code exposed.",
|
| 29 |
live=True
|
| 30 |
)
|
| 31 |
|