gamemeine commited on
Commit
2487097
·
1 Parent(s): e1f40af

Improrve ui, fix light theme, add arxiv url

Browse files
Files changed (3) hide show
  1. app.py +13 -8
  2. theme.py +0 -10
  3. views/example_view.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ import gradio as gr
13
  import pandas as pd
14
  from huggingface_hub import HfApi, hf_hub_download
15
 
16
- from theme import FORCE_LIGHT_THEME_JS, POVISLE_THEME
17
  from views import (
18
  render_examples_tab,
19
  render_leaderboard_category_tab,
@@ -98,13 +98,12 @@ footer {
98
  color: var(--povisle-ink) !important;
99
  display: block;
100
  font-family: var(--povisle-serif);
101
- font-size: clamp(1.7rem, 3.2vw, 3rem);
102
  font-weight: 600;
103
  letter-spacing: 0;
104
  line-height: 1.08;
105
  margin: 0 auto 12px;
106
- max-width: 980px;
107
- white-space: nowrap;
108
  }
109
  .povisle-title-accent {
110
  color: var(--povisle-accent) !important;
@@ -117,7 +116,7 @@ footer {
117
  color: var(--povisle-muted);
118
  font-size: 0.98rem;
119
  line-height: 1.8;
120
- margin: 18px auto 0;
121
  max-width: 720px;
122
  }
123
  .povisle-authors {
@@ -689,7 +688,7 @@ footer {
689
  }
690
  #examples-table table td:nth-child(2),
691
  #examples-table table th:nth-child(2) {
692
- width: 120px !important;
693
  }
694
  #examples-table table td:nth-child(3),
695
  #examples-table table th:nth-child(3) {
@@ -709,6 +708,10 @@ footer {
709
  #examples-table table th:nth-child(6) {
710
  width: 230px !important;
711
  }
 
 
 
 
712
  #examples-table table td:nth-child(7),
713
  #examples-table table th:nth-child(7) {
714
  width: 170px !important;
@@ -854,6 +857,9 @@ footer {
854
  .povisle-hero {
855
  padding: 48px 18px 38px;
856
  }
 
 
 
857
  .povisle-links-row {
858
  align-items: stretch;
859
  flex-direction: column;
@@ -1191,7 +1197,7 @@ HERO_HTML = """
1191
  <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/></svg>
1192
  Code
1193
  </a>
1194
- <a href="https://arxiv.org/" class="povisle-btn povisle-btn-outline" target="_blank">
1195
  <svg class="arxiv-icon" width="23" height="23" viewBox="0 0 448 512" aria-hidden="true"><path fill="currentColor" d="m 119.65,351.996 c -5.84961,0.13477 -11.1943,-3.29883 -13.502,-8.67578 -2.19629,-5.27051 -0.61914,-8.9668 4.19727,-15.8652 7.05469,-10.3799 78.8242,-96.5625 78.8242,-96.5625 l -15.8828,-14.8633 c -13.3809,-13.3779 -13.9561,-31.333 -1.50977,-43.7754 l 18.4922,-17.6133 -51.5977,-63.377 c -4.00586,-4.26758 -6.48535,-11.7559 -4.24805,-17.1309 2.27832,-5.53613 7.69727,-9.12891 13.6836,-9.07031 3.83398,0.0957 7.43262,1.87402 9.83789,4.86133 l 61.3691,57.0566 94.5762,-90.0703 c 3.19434,-3.08398 7.44336,-4.83984 11.8828,-4.91016 1.60449,0.0039 3.19824,0.245117 4.73242,0.714844 5.7793,1.80566 10.249,6.41797 11.8711,12.252 1.2998,5.47363 -0.27637,11.2334 -4.18164,15.2832 l -83.0859,100.011996 14.8789,13.834 c 11.0957,10.0029 11.1543,27.3906 0.12695,37.4688 l -16.2949,15.6309 56.2559,66.4434 0.0742,0.0859 0.0664,0.0899 c 5.02734,6.53125 7.43164,11.5615 4.83984,17.9395 -3.13379,5.96875 -8.69727,10.29 -15.2559,11.8516 -0.67676,0.0908 -1.35938,0.13574 -2.04297,0.13671 l -0.004,-0.0117 c -4.42871,-0.27051 -8.61035,-2.13086 -11.7754,-5.24023 l -0.13086,-0.10743 -0.12304,-0.11132 -65.207,-59.127 -89.8965,86.2402 c 0,0 -5.33398,6.47754 -10.9707,6.61133 z m 178.104,-33.041 c 0.47852,-0.002 0.95703,-0.0332 1.43164,-0.0957 4.84277,-1.33301 8.95605,-4.54004 11.4316,-8.91016 1.44922,-3.5625 1.00293,-6.45703 -4.19727,-13.2148 l -56.0586,-66.2188 -26.375,25.3027 64.9551,58.9062 c 2.33887,2.41504 5.46484,3.91113 8.8125,4.2168 v 0.0137 z M 192.436,227.402 334.446,57.244 c 2.78711,-3.48926 4.5293,-6.97949 3.3418,-10.9121 -1.16113,-4.30273 -4.43457,-7.71777 -8.68555,-9.05664 -1.08105,-0.333984 -2.20508,-0.503906 -3.33594,-0.505859 -3.20801,0.07617 -6.26953,1.35645 -8.57617,3.58789 l -142.033,135.284999 c -11.1719,11.1719 -9.48242,26.0195 1.39258,36.8945 z"/></svg>
1196
  Paper
1197
  </a>
@@ -1842,7 +1848,6 @@ with gr.Blocks(
1842
  theme=POVISLE_THEME,
1843
  css=APP_CSS,
1844
  head=APP_HEAD,
1845
- js=FORCE_LIGHT_THEME_JS,
1846
  ) as demo:
1847
  gr.HTML(HERO_HTML)
1848
  with gr.Group(elem_id="leaderboard-section"):
 
13
  import pandas as pd
14
  from huggingface_hub import HfApi, hf_hub_download
15
 
16
+ from theme import POVISLE_THEME
17
  from views import (
18
  render_examples_tab,
19
  render_leaderboard_category_tab,
 
98
  color: var(--povisle-ink) !important;
99
  display: block;
100
  font-family: var(--povisle-serif);
101
+ font-size: clamp(2.25rem, 4.2vw, 4rem);
102
  font-weight: 600;
103
  letter-spacing: 0;
104
  line-height: 1.08;
105
  margin: 0 auto 12px;
106
+ max-width: 1120px;
 
107
  }
108
  .povisle-title-accent {
109
  color: var(--povisle-accent) !important;
 
116
  color: var(--povisle-muted);
117
  font-size: 0.98rem;
118
  line-height: 1.8;
119
+ margin: 26px auto 0;
120
  max-width: 720px;
121
  }
122
  .povisle-authors {
 
688
  }
689
  #examples-table table td:nth-child(2),
690
  #examples-table table th:nth-child(2) {
691
+ width: 128px !important;
692
  }
693
  #examples-table table td:nth-child(3),
694
  #examples-table table th:nth-child(3) {
 
708
  #examples-table table th:nth-child(6) {
709
  width: 230px !important;
710
  }
711
+ #examples-table table td:nth-child(6),
712
+ #examples-table [role="gridcell"]:nth-child(6) {
713
+ white-space: pre-line !important;
714
+ }
715
  #examples-table table td:nth-child(7),
716
  #examples-table table th:nth-child(7) {
717
  width: 170px !important;
 
857
  .povisle-hero {
858
  padding: 48px 18px 38px;
859
  }
860
+ .povisle-hero h1 {
861
+ font-size: clamp(1.85rem, 9vw, 2.45rem);
862
+ }
863
  .povisle-links-row {
864
  align-items: stretch;
865
  flex-direction: column;
 
1197
  <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/></svg>
1198
  Code
1199
  </a>
1200
+ <a href="https://arxiv.org/abs/2608.07763" class="povisle-btn povisle-btn-outline" target="_blank">
1201
  <svg class="arxiv-icon" width="23" height="23" viewBox="0 0 448 512" aria-hidden="true"><path fill="currentColor" d="m 119.65,351.996 c -5.84961,0.13477 -11.1943,-3.29883 -13.502,-8.67578 -2.19629,-5.27051 -0.61914,-8.9668 4.19727,-15.8652 7.05469,-10.3799 78.8242,-96.5625 78.8242,-96.5625 l -15.8828,-14.8633 c -13.3809,-13.3779 -13.9561,-31.333 -1.50977,-43.7754 l 18.4922,-17.6133 -51.5977,-63.377 c -4.00586,-4.26758 -6.48535,-11.7559 -4.24805,-17.1309 2.27832,-5.53613 7.69727,-9.12891 13.6836,-9.07031 3.83398,0.0957 7.43262,1.87402 9.83789,4.86133 l 61.3691,57.0566 94.5762,-90.0703 c 3.19434,-3.08398 7.44336,-4.83984 11.8828,-4.91016 1.60449,0.0039 3.19824,0.245117 4.73242,0.714844 5.7793,1.80566 10.249,6.41797 11.8711,12.252 1.2998,5.47363 -0.27637,11.2334 -4.18164,15.2832 l -83.0859,100.011996 14.8789,13.834 c 11.0957,10.0029 11.1543,27.3906 0.12695,37.4688 l -16.2949,15.6309 56.2559,66.4434 0.0742,0.0859 0.0664,0.0899 c 5.02734,6.53125 7.43164,11.5615 4.83984,17.9395 -3.13379,5.96875 -8.69727,10.29 -15.2559,11.8516 -0.67676,0.0908 -1.35938,0.13574 -2.04297,0.13671 l -0.004,-0.0117 c -4.42871,-0.27051 -8.61035,-2.13086 -11.7754,-5.24023 l -0.13086,-0.10743 -0.12304,-0.11132 -65.207,-59.127 -89.8965,86.2402 c 0,0 -5.33398,6.47754 -10.9707,6.61133 z m 178.104,-33.041 c 0.47852,-0.002 0.95703,-0.0332 1.43164,-0.0957 4.84277,-1.33301 8.95605,-4.54004 11.4316,-8.91016 1.44922,-3.5625 1.00293,-6.45703 -4.19727,-13.2148 l -56.0586,-66.2188 -26.375,25.3027 64.9551,58.9062 c 2.33887,2.41504 5.46484,3.91113 8.8125,4.2168 v 0.0137 z M 192.436,227.402 334.446,57.244 c 2.78711,-3.48926 4.5293,-6.97949 3.3418,-10.9121 -1.16113,-4.30273 -4.43457,-7.71777 -8.68555,-9.05664 -1.08105,-0.333984 -2.20508,-0.503906 -3.33594,-0.505859 -3.20801,0.07617 -6.26953,1.35645 -8.57617,3.58789 l -142.033,135.284999 c -11.1719,11.1719 -9.48242,26.0195 1.39258,36.8945 z"/></svg>
1202
  Paper
1203
  </a>
 
1848
  theme=POVISLE_THEME,
1849
  css=APP_CSS,
1850
  head=APP_HEAD,
 
1851
  ) as demo:
1852
  gr.HTML(HERO_HTML)
1853
  with gr.Group(elem_id="leaderboard-section"):
theme.py CHANGED
@@ -73,13 +73,3 @@ POVISLE_THEME = gr.themes.Base(
73
  shadow_drop="0 2px 16px rgba(39, 33, 31, 0.07)",
74
  shadow_drop_lg="0 8px 40px rgba(39, 33, 31, 0.11)",
75
  )
76
-
77
- FORCE_LIGHT_THEME_JS = """
78
- () => {
79
- const url = new URL(window.location.href);
80
- if (url.searchParams.get("__theme") !== "light") {
81
- url.searchParams.set("__theme", "light");
82
- window.location.replace(url.toString());
83
- }
84
- }
85
- """
 
73
  shadow_drop="0 2px 16px rgba(39, 33, 31, 0.07)",
74
  shadow_drop_lg="0 8px 40px rgba(39, 33, 31, 0.11)",
75
  )
 
 
 
 
 
 
 
 
 
 
views/example_view.py CHANGED
@@ -21,7 +21,7 @@ EXAMPLE_COLUMNS = [
21
  "check_diacritics",
22
  ]
23
  EXAMPLE_DATATYPES = ["str", "str", "str", "html", "str", "str", "str", "str", "str", "str"]
24
- EXAMPLE_COLUMN_WIDTHS = ["90px", "120px", "130px", "110px", "300px", "230px", "170px", "190px", "90px", "100px"]
25
  TASK_TYPE_LABELS = {
26
  "mcq": "mcq",
27
  "yn": "yes/no",
 
21
  "check_diacritics",
22
  ]
23
  EXAMPLE_DATATYPES = ["str", "str", "str", "html", "str", "str", "str", "str", "str", "str"]
24
+ EXAMPLE_COLUMN_WIDTHS = ["90px", "128px", "130px", "110px", "300px", "230px", "170px", "190px", "90px", "100px"]
25
  TASK_TYPE_LABELS = {
26
  "mcq": "mcq",
27
  "yn": "yes/no",