Spaces:
Running
Running
Commit ·
6e61bd8
1
Parent(s): 884c8ed
Update title links & styling
Browse files- app.py +11 -4
- src/styling.py +43 -0
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
from typing import Optional, List
|
| 2 |
import gradio as gr
|
| 3 |
import pandas as pd
|
| 4 |
import matplotlib.pyplot as plt
|
|
@@ -17,6 +16,15 @@ radar_plotter = RadarPlotter(data_loader)
|
|
| 17 |
|
| 18 |
DEFAULT_METRIC = "Average ⭐"
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
def reload_data():
|
| 22 |
msg = data_loader.reload_data()
|
|
@@ -102,11 +110,10 @@ with gr.Blocks(css=academic_css) as demo:
|
|
| 102 |
"""
|
| 103 |
# <span class="emoji">🌍</span> iWorld-Bench Leaderboard
|
| 104 |
<span class="subtitle">A Benchmark for Interactive World Models with a Unified Action Generation Framework</span>
|
| 105 |
-
|
| 106 |
-
**[📄 Paper](https://arxiv.org/abs/xxx) | [💻 Code](https://github.com/xxx/iworld-bench) | [🌐 Website](https://xxx.github.io/iworld-bench)**
|
| 107 |
""",
|
| 108 |
-
elem_id="title"
|
| 109 |
)
|
|
|
|
| 110 |
|
| 111 |
# Hidden status box
|
| 112 |
status_box = gr.Markdown(visible=False)
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
| 3 |
import matplotlib.pyplot as plt
|
|
|
|
| 16 |
|
| 17 |
DEFAULT_METRIC = "Average ⭐"
|
| 18 |
|
| 19 |
+
TITLE_RESOURCE_LINKS = """
|
| 20 |
+
<div class="project-links-bar">
|
| 21 |
+
<a class="pl-link pl-project" href="https://iworld-bench.com/" target="_blank" rel="noopener noreferrer"><i class="fa-solid fa-globe" aria-hidden="true"></i><em>Project Page</em></a>
|
| 22 |
+
<a class="pl-link pl-dataset" href="https://huggingface.co/datasets/EmbodiedCity/iWorld-Bench-Dataset" target="_blank" rel="noopener noreferrer"><i class="fa-solid fa-database" aria-hidden="true"></i><em>Dataset</em></a>
|
| 23 |
+
<a class="pl-link pl-code" href="https://github.com/EmbodiedCity/iWorld-Bench" target="_blank" rel="noopener noreferrer"><i class="fa-brands fa-github" aria-hidden="true"></i><em>Code</em></a>
|
| 24 |
+
<a class="pl-link pl-leaderboard" href="https://huggingface.co/spaces/EmbodiedCity/iWorld-Bench" target="_blank" rel="noopener noreferrer"><i class="fa-solid fa-trophy" aria-hidden="true"></i><em>Leaderboard</em></a>
|
| 25 |
+
</div>
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
|
| 29 |
def reload_data():
|
| 30 |
msg = data_loader.reload_data()
|
|
|
|
| 110 |
"""
|
| 111 |
# <span class="emoji">🌍</span> iWorld-Bench Leaderboard
|
| 112 |
<span class="subtitle">A Benchmark for Interactive World Models with a Unified Action Generation Framework</span>
|
|
|
|
|
|
|
| 113 |
""",
|
| 114 |
+
elem_id="title",
|
| 115 |
)
|
| 116 |
+
gr.HTML(TITLE_RESOURCE_LINKS)
|
| 117 |
|
| 118 |
# Hidden status box
|
| 119 |
status_box = gr.Markdown(visible=False)
|
src/styling.py
CHANGED
|
@@ -3,6 +3,7 @@ import pandas as pd
|
|
| 3 |
def get_academic_css() -> str:
|
| 4 |
return """
|
| 5 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
| 6 |
|
| 7 |
:root {
|
| 8 |
/* Light mode (default) */
|
|
@@ -84,6 +85,48 @@ def get_academic_css() -> str:
|
|
| 84 |
font-size: 1.5em;
|
| 85 |
}
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
/* Leaderboard table styling */
|
| 88 |
.leaderboard-table {
|
| 89 |
width: 100%;
|
|
|
|
| 3 |
def get_academic_css() -> str:
|
| 4 |
return """
|
| 5 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 6 |
+
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
|
| 7 |
|
| 8 |
:root {
|
| 9 |
/* Light mode (default) */
|
|
|
|
| 85 |
font-size: 1.5em;
|
| 86 |
}
|
| 87 |
|
| 88 |
+
/* Title row links (aligned with LaTeX: magenta / teal / black / orange–yellow + FA icons) */
|
| 89 |
+
.project-links-bar {
|
| 90 |
+
display: flex;
|
| 91 |
+
flex-wrap: wrap;
|
| 92 |
+
justify-content: center;
|
| 93 |
+
align-items: center;
|
| 94 |
+
gap: clamp(1rem, 3vw, 2.65rem);
|
| 95 |
+
margin: 0.85rem auto 0.25rem;
|
| 96 |
+
font-size: 1rem;
|
| 97 |
+
line-height: 1.45;
|
| 98 |
+
max-width: 100%;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.project-links-bar .pl-link {
|
| 102 |
+
text-decoration: none;
|
| 103 |
+
white-space: nowrap;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.project-links-bar .pl-link:hover {
|
| 107 |
+
text-decoration: underline;
|
| 108 |
+
text-underline-offset: 0.2em;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.project-links-bar .pl-link em {
|
| 112 |
+
font-style: italic;
|
| 113 |
+
font-weight: 500;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.project-links-bar .pl-link i.fa-solid {
|
| 117 |
+
margin-right: 0.28em;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.pl-project { color: #c026d3; }
|
| 121 |
+
.pl-dataset { color: #0d9488; }
|
| 122 |
+
.pl-code { color: #111827; }
|
| 123 |
+
.pl-leaderboard { color: #eab308; }
|
| 124 |
+
|
| 125 |
+
@media (prefers-color-scheme: dark) {
|
| 126 |
+
.pl-code { color: #e5e7eb; }
|
| 127 |
+
.pl-leaderboard { color: #fcd34d; }
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
/* Leaderboard table styling */
|
| 131 |
.leaderboard-table {
|
| 132 |
width: 100%;
|