Spaces:
Running
Running
Commit
·
52692e6
1
Parent(s):
9d97c41
Adjust max width
Browse files- app.py +2 -17
- css_html_js.py +91 -0
app.py
CHANGED
@@ -2,24 +2,9 @@ import gradio as gr
|
|
2 |
|
3 |
from utils import *
|
4 |
from content import *
|
|
|
5 |
|
6 |
-
|
7 |
-
<style>
|
8 |
-
.main a {
|
9 |
-
color: blue;
|
10 |
-
text-decoration: underline;
|
11 |
-
}
|
12 |
-
|
13 |
-
@media (min-width: 1536px)
|
14 |
-
{
|
15 |
-
.gradio-container {
|
16 |
-
min-width: var(--size-full) !important;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
</style>
|
20 |
-
"""
|
21 |
-
|
22 |
-
with gr.Blocks(title=f'{benchname} Leaderboard', head=head_style) as demo:
|
23 |
gr.Markdown(intro_md)
|
24 |
|
25 |
with gr.Tabs(elem_classes='tab-buttons') as tabs:
|
|
|
2 |
|
3 |
from utils import *
|
4 |
from content import *
|
5 |
+
from css_html_js import *
|
6 |
|
7 |
+
with gr.Blocks(title=f'{benchname} Leaderboard', css=custom_css) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
gr.Markdown(intro_md)
|
9 |
|
10 |
with gr.Tabs(elem_classes='tab-buttons') as tabs:
|
css_html_js.py
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Custom CSS to limit the width of the Gradio Blocks interface
|
2 |
+
custom_css = """
|
3 |
+
.markdown-text {
|
4 |
+
font-size: 16px !important;
|
5 |
+
}
|
6 |
+
#models-to-add-text {
|
7 |
+
font-size: 18px !important;
|
8 |
+
}
|
9 |
+
#citation-button span {
|
10 |
+
font-size: 16px !important;
|
11 |
+
}
|
12 |
+
#citation-button textarea {
|
13 |
+
font-size: 16px !important;
|
14 |
+
}
|
15 |
+
#citation-button > label > button {
|
16 |
+
margin: 6px;
|
17 |
+
transform: scale(1.3);
|
18 |
+
}
|
19 |
+
#leaderboard-table {
|
20 |
+
margin-top: 15px
|
21 |
+
}
|
22 |
+
#leaderboard-table-lite {
|
23 |
+
margin-top: 15px
|
24 |
+
}
|
25 |
+
#search-bar-table-box > div:first-child {
|
26 |
+
background: none;
|
27 |
+
border: none;
|
28 |
+
}
|
29 |
+
|
30 |
+
#search-bar {
|
31 |
+
padding: 0px;
|
32 |
+
}
|
33 |
+
/* Hides the final AutoEvalColumn */
|
34 |
+
#llm-benchmark-tab-table table td:last-child,
|
35 |
+
#llm-benchmark-tab-table table th:last-child {
|
36 |
+
display: none;
|
37 |
+
}
|
38 |
+
/* Limit the width of the first AutoEvalColumn so that names don't expand too much */
|
39 |
+
table td:first-child,
|
40 |
+
table th:first-child {
|
41 |
+
max-width: 400px;
|
42 |
+
overflow: auto;
|
43 |
+
white-space: nowrap;
|
44 |
+
}
|
45 |
+
.tab-buttons button {
|
46 |
+
font-size: 20px;
|
47 |
+
}
|
48 |
+
#scale-logo {
|
49 |
+
border-style: none !important;
|
50 |
+
box-shadow: none;
|
51 |
+
display: block;
|
52 |
+
margin-left: auto;
|
53 |
+
margin-right: auto;
|
54 |
+
max-width: 600px;
|
55 |
+
}
|
56 |
+
#scale-logo .download {
|
57 |
+
display: none;
|
58 |
+
}
|
59 |
+
#filter_type{
|
60 |
+
border: 0;
|
61 |
+
padding-left: 0;
|
62 |
+
padding-top: 0;
|
63 |
+
}
|
64 |
+
#filter_type label {
|
65 |
+
display: flex;
|
66 |
+
}
|
67 |
+
#filter_type label > span{
|
68 |
+
margin-top: var(--spacing-lg);
|
69 |
+
margin-right: 0.5em;
|
70 |
+
}
|
71 |
+
#filter_type label > .wrap{
|
72 |
+
width: 103px;
|
73 |
+
}
|
74 |
+
#filter_type label > .wrap .wrap-inner{
|
75 |
+
padding: 2px;
|
76 |
+
}
|
77 |
+
#filter_type label > .wrap .wrap-inner input{
|
78 |
+
width: 1px
|
79 |
+
}
|
80 |
+
#filter-columns-type{
|
81 |
+
border:0;
|
82 |
+
padding:0.5;
|
83 |
+
}
|
84 |
+
#filter-columns-size{
|
85 |
+
border:0;
|
86 |
+
padding:0.5;
|
87 |
+
}
|
88 |
+
#box-filter > .form{
|
89 |
+
border: 0
|
90 |
+
}
|
91 |
+
"""
|