Spaces:
Sleeping
Sleeping
Update formatting and content
Browse files
app.py
CHANGED
|
@@ -1,40 +1,39 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
-
# Static data
|
| 5 |
STATIC_DATA = [
|
| 6 |
-
["
|
| 7 |
-
["
|
| 8 |
-
["
|
| 9 |
-
["
|
| 10 |
-
["
|
| 11 |
-
["
|
| 12 |
-
["
|
| 13 |
-
["
|
| 14 |
-
["
|
| 15 |
-
["
|
| 16 |
-
["
|
| 17 |
-
["
|
| 18 |
-
["
|
| 19 |
-
["
|
| 20 |
]
|
| 21 |
|
| 22 |
-
COLUMNS = ["
|
| 23 |
|
| 24 |
def create_leaderboard():
|
| 25 |
df = pd.DataFrame(STATIC_DATA, columns=COLUMNS)
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
# Create the Gradio interface
|
| 29 |
with gr.Blocks(title="World-in-World: Building a Closed-Loop World Interface to Evaluate World Models", theme=gr.themes.Soft()) as demo:
|
| 30 |
gr.HTML("<h1 style='text-align: center; margin-bottom: 1rem'>🏆 World-in-World: Building a Closed-Loop World Interface to Evaluate World Models</h1>")
|
| 31 |
|
| 32 |
-
gr.Markdown("""
|
| 33 |
-
**Performance comparison across vision-language models, image generation, and video generation models.**
|
| 34 |
-
|
| 35 |
-
📊 **Metrics:** Acc. ↑ (Accuracy - higher is better) | Mean Traj. ↓ (Mean Trajectory error - lower is better)
|
| 36 |
-
""")
|
| 37 |
-
|
| 38 |
with gr.Tabs():
|
| 39 |
with gr.TabItem("📊 Leaderboard"):
|
| 40 |
leaderboard_table = gr.DataFrame(
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
+
# Static data - reordered columns: Method, #Param., Input Type, Control Type, Model Type, Mean Traj. ↓, Acc. ↑
|
| 5 |
STATIC_DATA = [
|
| 6 |
+
["w/o WM", "72B", "RGB", "–", "VLM", 6.24, 50.27],
|
| 7 |
+
["PathDreamer [36]", "0.69B", "RGB-D; Sem; Pano", "Viewpoint", "Image Gen.", 5.28, 56.99],
|
| 8 |
+
["SE3DS [11]", "1.1B", "RGB-D; Pano", "Viewpoint", "Image Gen.", 5.29, 57.53],
|
| 9 |
+
["NWM [25]", "1B", "RGB", "Trajectory", "Video Gen.", 5.68, 57.35],
|
| 10 |
+
["SVD [6]", "1.5B", "RGB", "Image", "Video Gen.", 5.29, 57.71],
|
| 11 |
+
["LTX-Video [5]", "2B", "RGB", "Text", "Video Gen.", 5.37, 56.08],
|
| 12 |
+
["Hunyuan [4]", "13B", "RGB", "Text", "Video Gen.", 5.21, 57.71],
|
| 13 |
+
["Wan2.1 [23]", "14B", "RGB", "Text", "Video Gen.", 5.24, 58.26],
|
| 14 |
+
["Cosmos [1]", "2B", "RGB", "Text", "Video Gen.", 5.898, 52.27],
|
| 15 |
+
["Runway", "–", "–", "Text", "Video Gen.", "–", "–"],
|
| 16 |
+
["SVD† [6]", "1.5B", "RGB; Pano", "Action", "Video Gen. Post-Train", 5.02, 60.98],
|
| 17 |
+
["LTX† [5]", "2B", "RGB; Pano", "Action", "Video Gen. Post-Train", 5.49, 57.53],
|
| 18 |
+
["WAN2.1† [23]", "14B", "RGB; Pano", "Action", "Video Gen. Post-Train", "XXX", "XXX"],
|
| 19 |
+
["Cosmos† [1]", "2B", "RGB; Pano", "Action", "Video Gen. Post-Train", 5.08, 60.25],
|
| 20 |
]
|
| 21 |
|
| 22 |
+
COLUMNS = ["Method", "#Param.", "Input Type", "Control Type", "Model Type", "Mean Traj. ↓", "Acc. ↑"]
|
| 23 |
|
| 24 |
def create_leaderboard():
|
| 25 |
df = pd.DataFrame(STATIC_DATA, columns=COLUMNS)
|
| 26 |
+
# Sort by accuracy in descending order (highest first), handling non-numeric values
|
| 27 |
+
df_clean = df.copy()
|
| 28 |
+
# Replace non-numeric values with -1 for sorting (so they appear at bottom)
|
| 29 |
+
df_clean['Acc. ↑'] = pd.to_numeric(df_clean['Acc. ↑'], errors='coerce').fillna(-1)
|
| 30 |
+
df_sorted = df_clean.sort_values('Acc. ↑', ascending=False)
|
| 31 |
+
# Return original df with the sorted order but original values
|
| 32 |
+
return df.iloc[df_sorted.index].reset_index(drop=True)
|
| 33 |
|
|
|
|
| 34 |
with gr.Blocks(title="World-in-World: Building a Closed-Loop World Interface to Evaluate World Models", theme=gr.themes.Soft()) as demo:
|
| 35 |
gr.HTML("<h1 style='text-align: center; margin-bottom: 1rem'>🏆 World-in-World: Building a Closed-Loop World Interface to Evaluate World Models</h1>")
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
with gr.Tabs():
|
| 38 |
with gr.TabItem("📊 Leaderboard"):
|
| 39 |
leaderboard_table = gr.DataFrame(
|