Spaces:
Running
Running
michal
commited on
Commit
·
aff51a8
1
Parent(s):
4ddc710
Upload
Browse files- app.py +1 -28
- src/styles.py +28 -0
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from gradio_leaderboard import Leaderboard
|
3 |
from pathlib import Path
|
4 |
import pandas as pd
|
5 |
-
from src.styles import custom_css
|
6 |
|
7 |
from src.structures.leaderboard_structure import (LB_LLMZSZL,
|
8 |
ORDER_LIST,
|
@@ -19,33 +19,6 @@ from src.structures.osm import OSM_SCORES
|
|
19 |
global data_component
|
20 |
from src.abouts import *
|
21 |
|
22 |
-
polygon_svg = """
|
23 |
-
<svg width="400px" height="190px" viewBox="0 0 243.6 180.2" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">
|
24 |
-
<style type="text/css">
|
25 |
-
.st0{fill:#E52713;} /* Sets the fill color to red */
|
26 |
-
</style>
|
27 |
-
<g>
|
28 |
-
<polygon class="st0" points="147.4,97.1 147.4,107.5 137,107.5 137,103.1 126.1,103.1 126.1,104.7 121.3,104.7 121.3,103.1
|
29 |
-
110.8,103.1 110.8,107.5 100.4,107.5 100.4,97.1 110.8,97.1 110.8,101.5 121.3,101.5 121.3,99.9 126.1,99.9 126.1,101.5 137,101.5
|
30 |
-
137,97.1"></polygon>
|
31 |
-
<polygon class="st0" points="168.3,74.9 168.3,85.3 157.8,85.3 157.8,80.9 137,80.9 137,85.3 126.6,85.3 126.6,80.9 108.7,80.9
|
32 |
-
108.7,89.2 90.4,89.2 90.4,80.9 69.6,80.9 69.6,82.5 64.8,82.5 64.8,80.9 48,80.9 48,85.3 37.5,85.3 37.5,74.9 48,74.9 48,79.3
|
33 |
-
64.8,79.3 64.8,77.7 69.6,77.7 69.6,79.3 90.4,79.3 90.4,70.9 108.7,70.9 108.7,79.3 126.6,79.3 126.6,74.9 137,74.9 137,79.3
|
34 |
-
157.8,79.3 157.8,74.9"></polygon>
|
35 |
-
<polygon class="st0" points="174.7,51.7 174.7,62.1 164.3,62.1 164.3,57.7 150.3,57.7 150.3,59.3 145.4,59.3 145.4,57.7
|
36 |
-
130.6,57.7 130.6,64.6 115.2,64.6 115.2,57.7 102,57.7 102,59.3 97.2,59.3 97.2,57.7 84.5,57.7 84.5,68.4 61.4,68.4 61.4,57.7
|
37 |
-
51.2,57.7 51.2,62.1 40.8,62.1 40.8,57.7 30.7,57.7 30.7,62.1 20.3,62.1 20.3,51.7 30.7,51.7 30.7,56.1 40.8,56.1 40.8,51.7
|
38 |
-
51.2,51.7 51.2,56.1 61.4,56.1 61.4,45.3 84.5,45.3 84.5,56.1 97.2,56.1 97.2,54.5 102,54.5 102,56.1 115.2,56.1 115.2,49.2
|
39 |
-
130.6,49.2 130.6,56.1 145.4,56.1 145.4,54.5 150.3,54.5 150.3,56.1 164.3,56.1 164.3,51.7"></polygon>
|
40 |
-
<polygon class="st0" points="155.5,32.2 155.5,42.6 145.1,42.6 145.1,38.2 125.7,38.2 125.7,39.8 120.9,39.8 120.9,38.2 98.7,38.2
|
41 |
-
98.7,42.6 88.3,42.6 88.3,38.2 53.2,38.2 53.2,42.6 42.8,42.6 42.8,32.2 53.2,32.2 53.2,36.6 88.3,36.6 88.3,32.2 98.7,32.2
|
42 |
-
98.7,36.6 120.9,36.6 120.9,35 125.7,35 125.7,36.6 145.1,36.6 145.1,32.2"></polygon>
|
43 |
-
<polygon class="st0" points="125.6,16.2 125.6,26.6 115.2,26.6 115.2,22.2 102.5,22.2 102.5,23.9 97.7,23.9 97.7,22.2 85.1,22.2
|
44 |
-
85.1,26.6 74.7,26.6 74.7,16.2 85.1,16.2 85.1,20.6 97.7,20.6 97.7,19 102.5,19 102.5,20.6 115.2,20.6 115.2,16.2"></polygon>
|
45 |
-
<rect x="128" y="116.8" class="st0" width="10.4" height="10.4"></rect>
|
46 |
-
</g>
|
47 |
-
</svg>
|
48 |
-
"""
|
49 |
|
50 |
main = gr.Blocks(css=custom_css)
|
51 |
with main:
|
|
|
2 |
from gradio_leaderboard import Leaderboard
|
3 |
from pathlib import Path
|
4 |
import pandas as pd
|
5 |
+
from src.styles import custom_css, polygon_svg
|
6 |
|
7 |
from src.structures.leaderboard_structure import (LB_LLMZSZL,
|
8 |
ORDER_LIST,
|
|
|
19 |
global data_component
|
20 |
from src.abouts import *
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
main = gr.Blocks(css=custom_css)
|
24 |
with main:
|
src/styles.py
CHANGED
@@ -106,3 +106,31 @@ get_window_url_params = """
|
|
106 |
return url_params;
|
107 |
}
|
108 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
return url_params;
|
107 |
}
|
108 |
"""
|
109 |
+
|
110 |
+
polygon_svg = """
|
111 |
+
<svg width="400px" height="190px" viewBox="0 0 243.6 180.2" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">
|
112 |
+
<style type="text/css">
|
113 |
+
.st0{fill:#E52713;} /* Sets the fill color to red */
|
114 |
+
</style>
|
115 |
+
<g>
|
116 |
+
<polygon class="st0" points="147.4,97.1 147.4,107.5 137,107.5 137,103.1 126.1,103.1 126.1,104.7 121.3,104.7 121.3,103.1
|
117 |
+
110.8,103.1 110.8,107.5 100.4,107.5 100.4,97.1 110.8,97.1 110.8,101.5 121.3,101.5 121.3,99.9 126.1,99.9 126.1,101.5 137,101.5
|
118 |
+
137,97.1"></polygon>
|
119 |
+
<polygon class="st0" points="168.3,74.9 168.3,85.3 157.8,85.3 157.8,80.9 137,80.9 137,85.3 126.6,85.3 126.6,80.9 108.7,80.9
|
120 |
+
108.7,89.2 90.4,89.2 90.4,80.9 69.6,80.9 69.6,82.5 64.8,82.5 64.8,80.9 48,80.9 48,85.3 37.5,85.3 37.5,74.9 48,74.9 48,79.3
|
121 |
+
64.8,79.3 64.8,77.7 69.6,77.7 69.6,79.3 90.4,79.3 90.4,70.9 108.7,70.9 108.7,79.3 126.6,79.3 126.6,74.9 137,74.9 137,79.3
|
122 |
+
157.8,79.3 157.8,74.9"></polygon>
|
123 |
+
<polygon class="st0" points="174.7,51.7 174.7,62.1 164.3,62.1 164.3,57.7 150.3,57.7 150.3,59.3 145.4,59.3 145.4,57.7
|
124 |
+
130.6,57.7 130.6,64.6 115.2,64.6 115.2,57.7 102,57.7 102,59.3 97.2,59.3 97.2,57.7 84.5,57.7 84.5,68.4 61.4,68.4 61.4,57.7
|
125 |
+
51.2,57.7 51.2,62.1 40.8,62.1 40.8,57.7 30.7,57.7 30.7,62.1 20.3,62.1 20.3,51.7 30.7,51.7 30.7,56.1 40.8,56.1 40.8,51.7
|
126 |
+
51.2,51.7 51.2,56.1 61.4,56.1 61.4,45.3 84.5,45.3 84.5,56.1 97.2,56.1 97.2,54.5 102,54.5 102,56.1 115.2,56.1 115.2,49.2
|
127 |
+
130.6,49.2 130.6,56.1 145.4,56.1 145.4,54.5 150.3,54.5 150.3,56.1 164.3,56.1 164.3,51.7"></polygon>
|
128 |
+
<polygon class="st0" points="155.5,32.2 155.5,42.6 145.1,42.6 145.1,38.2 125.7,38.2 125.7,39.8 120.9,39.8 120.9,38.2 98.7,38.2
|
129 |
+
98.7,42.6 88.3,42.6 88.3,38.2 53.2,38.2 53.2,42.6 42.8,42.6 42.8,32.2 53.2,32.2 53.2,36.6 88.3,36.6 88.3,32.2 98.7,32.2
|
130 |
+
98.7,36.6 120.9,36.6 120.9,35 125.7,35 125.7,36.6 145.1,36.6 145.1,32.2"></polygon>
|
131 |
+
<polygon class="st0" points="125.6,16.2 125.6,26.6 115.2,26.6 115.2,22.2 102.5,22.2 102.5,23.9 97.7,23.9 97.7,22.2 85.1,22.2
|
132 |
+
85.1,26.6 74.7,26.6 74.7,16.2 85.1,16.2 85.1,20.6 97.7,20.6 97.7,19 102.5,19 102.5,20.6 115.2,20.6 115.2,16.2"></polygon>
|
133 |
+
<rect x="128" y="116.8" class="st0" width="10.4" height="10.4"></rect>
|
134 |
+
</g>
|
135 |
+
</svg>
|
136 |
+
"""
|