geoalgo commited on
Commit
ff61dce
Β·
1 Parent(s): 43752dc
Files changed (2) hide show
  1. main.py +37 -2
  2. rank_through_time.py +4 -4
main.py CHANGED
@@ -37,10 +37,45 @@ def build_plots(metric, subdataset):
37
  return fig_rank, fig_value
38
 
39
 
40
- HEADER_CSS = """\
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  .table-wrap thead th {
42
  background-color: #e2e8f0 !important;
43
  }
 
 
 
 
 
 
 
 
 
 
44
  """
45
 
46
  with gr.Blocks(title="Impermanent Leaderboard") as app:
@@ -127,4 +162,4 @@ with gr.Blocks(title="Impermanent Leaderboard") as app:
127
  )
128
 
129
  if __name__ == "__main__":
130
- app.launch(css=HEADER_CSS)
 
37
  return fig_rank, fig_value
38
 
39
 
40
+ CUSTOM_CSS = """\
41
+ /* ── Accent top bar ─────────────────────────────────────── */
42
+ .gradio-container::before {
43
+ content: "";
44
+ display: block;
45
+ height: 4px;
46
+ background: linear-gradient(90deg, #2b6cb0, #38b2ac);
47
+ margin: -16px -16px 16px -16px;
48
+ }
49
+
50
+ /* ── Header card (title + description) ──────────────────── */
51
+ .gradio-container > .main > .wrap > div:first-child {
52
+ background: #f7fafc;
53
+ border: 1px solid #e2e8f0;
54
+ border-radius: 10px;
55
+ padding: 20px 24px;
56
+ margin-bottom: 12px;
57
+ }
58
+
59
+ /* ── Active tab accent ──────────────────────────────────── */
60
+ button.tab-nav-button.selected {
61
+ border-bottom-color: #2b6cb0 !important;
62
+ color: #2b6cb0 !important;
63
+ }
64
+
65
+ /* ── Table header ───────────────────────────────────────── */
66
  .table-wrap thead th {
67
  background-color: #e2e8f0 !important;
68
  }
69
+
70
+ /* ── Dropdown borders ───────────────────────────────────── */
71
+ .gr-dropdown, .multiselect-dropdown {
72
+ border-radius: 6px !important;
73
+ }
74
+
75
+ /* ── Tab content spacing ────────────────────────────────── */
76
+ .tabitem {
77
+ padding-top: 12px;
78
+ }
79
  """
80
 
81
  with gr.Blocks(title="Impermanent Leaderboard") as app:
 
162
  )
163
 
164
  if __name__ == "__main__":
165
+ app.launch(css=CUSTOM_CSS)
rank_through_time.py CHANGED
@@ -79,7 +79,7 @@ def plot_rank_per_category(df, metric):
79
  ax.set_title(f"{subdataset} / {frequency}")
80
  _style_rank_ax(ax, n_models)
81
 
82
- fig.suptitle(f"Model rank through time β€” {metric}", fontsize=14)
83
  _finish_fig(fig)
84
  return fig
85
 
@@ -141,7 +141,7 @@ def plot_value_per_category(df, metric):
141
  ax.set_title(f"{subdataset} / {frequency}")
142
  _style_value_ax(ax, metric)
143
 
144
- fig.suptitle(f"Model {metric} through time", fontsize=14)
145
  _finish_fig(fig)
146
  return fig
147
 
@@ -201,7 +201,7 @@ def plot_rank_for_subdataset(df, metric, subdataset):
201
  ax.set_title(f"{subdataset} / {frequency}")
202
  _style_rank_ax(ax, n_models)
203
 
204
- fig.suptitle(f"Model rank through time β€” {metric}", fontsize=14)
205
  _finish_fig(fig)
206
  return fig
207
 
@@ -236,7 +236,7 @@ def plot_value_for_subdataset(df, metric, subdataset):
236
  ax.set_title(f"{subdataset} / {frequency}")
237
  _style_value_ax(ax, metric)
238
 
239
- fig.suptitle(f"Model {metric} through time", fontsize=14)
240
  _finish_fig(fig)
241
  return fig
242
 
 
79
  ax.set_title(f"{subdataset} / {frequency}")
80
  _style_rank_ax(ax, n_models)
81
 
82
+ fig.suptitle(f"Rank through time β€” {metric.upper()}", fontsize=14)
83
  _finish_fig(fig)
84
  return fig
85
 
 
141
  ax.set_title(f"{subdataset} / {frequency}")
142
  _style_value_ax(ax, metric)
143
 
144
+ fig.suptitle(f"Model {metric.upper()} through time", fontsize=14)
145
  _finish_fig(fig)
146
  return fig
147
 
 
201
  ax.set_title(f"{subdataset} / {frequency}")
202
  _style_rank_ax(ax, n_models)
203
 
204
+ fig.suptitle(f"Rank through time β€” {metric.upper()}", fontsize=14)
205
  _finish_fig(fig)
206
  return fig
207
 
 
236
  ax.set_title(f"{subdataset} / {frequency}")
237
  _style_value_ax(ax, metric)
238
 
239
+ fig.suptitle(f"Model {metric.upper()} through time", fontsize=14)
240
  _finish_fig(fig)
241
  return fig
242