hysts HF staff commited on
Commit
a294b5c
1 Parent(s): e9e4fd6
Files changed (3) hide show
  1. app.py +1 -2
  2. src/display/css_html_js.py +0 -98
  3. style.css +95 -0
app.py CHANGED
@@ -19,7 +19,6 @@ from src.about import (
19
  TITLE,
20
  TaskType,
21
  )
22
- from src.display.css_html_js import custom_css
23
  from src.display.utils import (
24
  BENCHMARK_COLS,
25
  COLS,
@@ -538,7 +537,7 @@ def update_language(language: str) -> tuple[gr.Markdown, gr.Markdown, gr.Markdow
538
  )
539
 
540
 
541
- with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Glass()) as demo:
542
  gr.HTML(TITLE)
543
  introduction_text = gr.Markdown(INTRODUCTION_TEXT_JA, elem_classes="markdown-text")
544
 
 
19
  TITLE,
20
  TaskType,
21
  )
 
22
  from src.display.utils import (
23
  BENCHMARK_COLS,
24
  COLS,
 
537
  )
538
 
539
 
540
+ with gr.Blocks(css_paths="style.css", theme=gr.themes.Glass()) as demo:
541
  gr.HTML(TITLE)
542
  introduction_text = gr.Markdown(INTRODUCTION_TEXT_JA, elem_classes="markdown-text")
543
 
src/display/css_html_js.py CHANGED
@@ -1,101 +1,3 @@
1
- custom_css = """
2
-
3
- .markdown-text {
4
- font-size: 16px !important;
5
- }
6
-
7
- #models-to-add-text {
8
- font-size: 18px !important;
9
- }
10
-
11
- #citation-button span {
12
- font-size: 16px !important;
13
- }
14
-
15
- #citation-button textarea {
16
- font-size: 16px !important;
17
- }
18
-
19
- #citation-button > label > button {
20
- margin: 6px;
21
- transform: scale(1.3);
22
- }
23
-
24
- #leaderboard-table {
25
- margin-top: 15px
26
- }
27
-
28
- #leaderboard-table-lite {
29
- margin-top: 15px
30
- }
31
-
32
- #search-bar-table-box > div:first-child {
33
- background: none;
34
- border: none;
35
- }
36
-
37
- #search-bar {
38
- padding: 0px;
39
- }
40
-
41
- /* Limit the width of the first AutoEvalColumn so that names don't expand too much */
42
- table td:first-child,
43
- table th:first-child {
44
- max-width: 400px;
45
- overflow: auto;
46
- white-space: nowrap;
47
- }
48
-
49
- .tab-buttons button {
50
- font-size: 20px;
51
- }
52
-
53
- #scale-logo {
54
- border-style: none !important;
55
- box-shadow: none;
56
- display: block;
57
- margin-left: auto;
58
- margin-right: auto;
59
- max-width: 600px;
60
- }
61
-
62
- #scale-logo .download {
63
- display: none;
64
- }
65
- #filter_type{
66
- border: 0;
67
- padding-left: 0;
68
- padding-top: 0;
69
- }
70
- #filter_type label {
71
- display: flex;
72
- }
73
- #filter_type label > span{
74
- margin-top: var(--spacing-lg);
75
- margin-right: 0.5em;
76
- }
77
- #filter_type label > .wrap{
78
- width: 103px;
79
- }
80
- #filter_type label > .wrap .wrap-inner{
81
- padding: 2px;
82
- }
83
- #filter_type label > .wrap .wrap-inner input{
84
- width: 1px
85
- }
86
- #filter-columns-type{
87
- border:0;
88
- padding:0.5;
89
- }
90
- #filter-columns-size{
91
- border:0;
92
- padding:0.5;
93
- }
94
- #box-filter > .form{
95
- border: 0
96
- }
97
- """
98
-
99
  get_window_url_params = """
100
  function(url_params) {
101
  const params = new URLSearchParams(window.location.search);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  get_window_url_params = """
2
  function(url_params) {
3
  const params = new URLSearchParams(window.location.search);
style.css CHANGED
@@ -1,3 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .language-selector {
2
  width: auto;
3
  display: flex;
 
1
+ .markdown-text {
2
+ font-size: 16px !important;
3
+ }
4
+
5
+ #models-to-add-text {
6
+ font-size: 18px !important;
7
+ }
8
+
9
+ #citation-button span {
10
+ font-size: 16px !important;
11
+ }
12
+
13
+ #citation-button textarea {
14
+ font-size: 16px !important;
15
+ }
16
+
17
+ #citation-button > label > button {
18
+ margin: 6px;
19
+ transform: scale(1.3);
20
+ }
21
+
22
+ #leaderboard-table {
23
+ margin-top: 15px
24
+ }
25
+
26
+ #leaderboard-table-lite {
27
+ margin-top: 15px
28
+ }
29
+
30
+ #search-bar-table-box > div:first-child {
31
+ background: none;
32
+ border: none;
33
+ }
34
+
35
+ #search-bar {
36
+ padding: 0px;
37
+ }
38
+
39
+ /* Limit the width of the first AutoEvalColumn so that names don't expand too much */
40
+ table td:first-child,
41
+ table th:first-child {
42
+ max-width: 400px;
43
+ overflow: auto;
44
+ white-space: nowrap;
45
+ }
46
+
47
+ .tab-buttons button {
48
+ font-size: 20px;
49
+ }
50
+
51
+ #scale-logo {
52
+ border-style: none !important;
53
+ box-shadow: none;
54
+ display: block;
55
+ margin-left: auto;
56
+ margin-right: auto;
57
+ max-width: 600px;
58
+ }
59
+
60
+ #scale-logo .download {
61
+ display: none;
62
+ }
63
+ #filter_type{
64
+ border: 0;
65
+ padding-left: 0;
66
+ padding-top: 0;
67
+ }
68
+ #filter_type label {
69
+ display: flex;
70
+ }
71
+ #filter_type label > span{
72
+ margin-top: var(--spacing-lg);
73
+ margin-right: 0.5em;
74
+ }
75
+ #filter_type label > .wrap{
76
+ width: 103px;
77
+ }
78
+ #filter_type label > .wrap .wrap-inner{
79
+ padding: 2px;
80
+ }
81
+ #filter_type label > .wrap .wrap-inner input{
82
+ width: 1px
83
+ }
84
+ #filter-columns-type{
85
+ border:0;
86
+ padding:0.5;
87
+ }
88
+ #filter-columns-size{
89
+ border:0;
90
+ padding:0.5;
91
+ }
92
+ #box-filter > .form{
93
+ border: 0
94
+ }
95
+
96
  .language-selector {
97
  width: auto;
98
  display: flex;