Spaces:
Running
Running
michal
commited on
Commit
·
56d4acc
1
Parent(s):
54f0e5a
Upload
Browse files- app.py +7 -6
- src/structures/all_structure.py +1 -1
- src/styles.py +72 -0
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from src.styles import custom_css
|
3 |
|
4 |
from src.structures.all_structure import (
|
5 |
ALL_ACCS,
|
@@ -37,11 +37,12 @@ main = gr.Blocks(css=custom_css)
|
|
37 |
with main:
|
38 |
with gr.Row():
|
39 |
with gr.Column():
|
40 |
-
image = gr.Image("src/images/logo.png",
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
45 |
with gr.Column():
|
46 |
gr.HTML(HEADER_TITLE)
|
47 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
|
|
1 |
import gradio as gr
|
2 |
+
from src.styles import custom_css, polygon_svg
|
3 |
|
4 |
from src.structures.all_structure import (
|
5 |
ALL_ACCS,
|
|
|
37 |
with main:
|
38 |
with gr.Row():
|
39 |
with gr.Column():
|
40 |
+
# image = gr.Image("src/images/logo.png",
|
41 |
+
# show_download_button=False,
|
42 |
+
# show_share_button=False,
|
43 |
+
# show_fullscreen_button=False,
|
44 |
+
# container=False)
|
45 |
+
gr.HTML(polygon_svg)
|
46 |
with gr.Column():
|
47 |
gr.HTML(HEADER_TITLE)
|
48 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
src/structures/all_structure.py
CHANGED
@@ -59,5 +59,5 @@ columns = list(ALL_ACCS.columns)
|
|
59 |
columns.insert(1, columns.pop(columns.index('Average')))
|
60 |
ALL_ACCS = ALL_ACCS[columns]
|
61 |
STYLED = ALL_ACCS.style.highlight_max(
|
62 |
-
color = '#
|
63 |
subset=ALL_ACCS.columns[-4:]).format(precision=2)
|
|
|
59 |
columns.insert(1, columns.pop(columns.index('Average')))
|
60 |
ALL_ACCS = ALL_ACCS[columns]
|
61 |
STYLED = ALL_ACCS.style.highlight_max(
|
62 |
+
color = '#E52713',
|
63 |
subset=ALL_ACCS.columns[-4:]).format(precision=2)
|
src/styles.py
CHANGED
@@ -106,3 +106,75 @@ get_window_url_params = """
|
|
106 |
return url_params;
|
107 |
}
|
108 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
return url_params;
|
107 |
}
|
108 |
"""
|
109 |
+
|
110 |
+
polygon_svg = """
|
111 |
+
<a href="https://csi.amu.edu.pl/en" target="_blank">
|
112 |
+
<svg width="460px" height="190px" viewBox="60 -10 243.6 200.2" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">
|
113 |
+
<style type="text/css">
|
114 |
+
.st0{fill:#E52713;} /* Sets the fill color to red */
|
115 |
+
.st1 { fill: #FFFFFF; } /* Sets the fill color to blue */
|
116 |
+
</style>
|
117 |
+
<g>
|
118 |
+
<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
|
119 |
+
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
|
120 |
+
137,97.1"></polygon>
|
121 |
+
<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
|
122 |
+
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
|
123 |
+
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
|
124 |
+
157.8,79.3 157.8,74.9"></polygon>
|
125 |
+
<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
|
126 |
+
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
|
127 |
+
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
|
128 |
+
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
|
129 |
+
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>
|
130 |
+
<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
|
131 |
+
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
|
132 |
+
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>
|
133 |
+
<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
|
134 |
+
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>
|
135 |
+
<rect x="128" y="116.8" class="st0" width="10.4" height="10.4"></rect>
|
136 |
+
</g>
|
137 |
+
<g class="st1">
|
138 |
+
<path d="M196.7,34.3c0-6,4.6-10.9,11-10.9c3.9,0,7.3,2,9.1,5.2l-1.9,1.1c-1.3-2.5-4.1-4.2-7.2-4.2c-5.3,0-8.9,3.9-8.9,8.8
|
139 |
+
c0,4.9,3.6,8.8,8.9,8.8c3.1,0,5.9-1.7,7.2-4.2l1.9,1c-1.7,3.1-5.2,5.2-9.1,5.2C201.3,45.1,196.7,40.3,196.7,34.3z"></path>
|
140 |
+
<path d="M235.3,42.8v2H223v-21h12.2v2h-10v7.4h9.3v2h-9.3v7.6H235.3z"></path>
|
141 |
+
<path d="M257.2,23.8v21h-1.8l-11.7-17.1v17.1h-2.1v-21h1.8l11.7,17.1V23.8H257.2z"></path>
|
142 |
+
<path d="M277.9,25.7h-6.5v19h-2.1v-19h-6.5v-2h15V25.7z"></path>
|
143 |
+
<path d="M295.9,42.8v2h-12.3v-21h12.2v2h-10v7.4h9.3v2h-9.3v7.6H295.9z"></path>
|
144 |
+
<path d="M310.1,36.4h-5.9v8.4h-2.1v-21h8.4c3.5,0,6.3,2.8,6.3,6.3c0,2.8-1.9,5.3-4.5,6l5.1,8.7h-2.4L310.1,36.4z M304.3,34.4h6.3
|
145 |
+
c2.3,0,4.2-1.9,4.2-4.3c0-2.4-1.9-4.3-4.2-4.3h-6.3V34.4z"></path>
|
146 |
+
<path d="M335.5,25.7v7.7h9.3v2h-9.3v9.3h-2.1v-21h11.8v2H335.5z"></path>
|
147 |
+
<path d="M350.3,34.3c0-6,4.7-10.9,10.9-10.9S372,28.3,372,34.3c0,6-4.7,10.9-10.9,10.9S350.3,40.3,350.3,34.3z M369.9,34.3
|
148 |
+
c0-4.9-3.8-8.8-8.8-8.8s-8.8,3.9-8.8,8.8c0,4.9,3.8,8.8,8.8,8.8S369.9,39.2,369.9,34.3z"></path>
|
149 |
+
<path d="M386.3,36.4h-5.9v8.4h-2.1v-21h8.4c3.5,0,6.3,2.8,6.3,6.3c0,2.8-1.9,5.3-4.5,6l5.1,8.7h-2.4L386.3,36.4z M380.4,34.4h6.3
|
150 |
+
c2.3,0,4.2-1.9,4.2-4.3c0-2.4-1.9-4.3-4.2-4.3h-6.3V34.4z"></path>
|
151 |
+
<path d="M209.9,73.6h-10l-2,5.2h-2.2l8.1-21h2.2l8.1,21h-2.2L209.9,73.6z M209.2,71.6L205,60.4l-4.2,11.2H209.2z"></path>
|
152 |
+
<path d="M227.5,70.4h-5.9v8.4h-2.1v-21h8.4c3.5,0,6.3,2.8,6.3,6.3c0,2.8-1.9,5.3-4.5,6l5.1,8.7h-2.4L227.5,70.4z M221.6,68.4h6.3
|
153 |
+
c2.3,0,4.2-1.9,4.2-4.3c0-2.4-1.9-4.3-4.2-4.3h-6.3V68.4z"></path>
|
154 |
+
<path d="M253.3,59.7h-6.5v19h-2.1v-19h-6.5v-2h15V59.7z"></path>
|
155 |
+
<path d="M261.1,57.8v21H259v-21H261.1z"></path>
|
156 |
+
<path d="M270.7,59.7v7.7h9.3v2h-9.3v9.3h-2.1v-21h11.8v2H270.7z"></path>
|
157 |
+
<path d="M288.8,57.8v21h-2.1v-21H288.8z"></path>
|
158 |
+
<path d="M295.1,68.3c0-6,4.6-10.9,11-10.9c3.9,0,7.3,2,9.1,5.2l-1.9,1.1c-1.3-2.5-4.1-4.2-7.2-4.2c-5.3,0-8.9,3.9-8.9,8.8
|
159 |
+
c0,4.9,3.6,8.8,8.9,8.8c3.1,0,5.9-1.7,7.2-4.2l1.9,1c-1.7,3.1-5.2,5.2-9.1,5.2C299.7,79.1,295.1,74.3,295.1,68.3z"></path>
|
160 |
+
<path d="M323.5,57.8v21h-2.1v-21H323.5z"></path>
|
161 |
+
<path d="M343,73.6h-10l-2,5.2h-2.2l8.1-21h2.2l8.1,21h-2.2L343,73.6z M342.2,71.6L338,60.4l-4.2,11.2H342.2z"></path>
|
162 |
+
<path d="M364.3,76.8v2h-11.7v-21h2.1v19H364.3z"></path>
|
163 |
+
<path d="M200,91.8v21h-2.1v-21H200z"></path>
|
164 |
+
<path d="M223.1,91.8v21h-1.8l-11.7-17.1v17.1h-2.1v-21h1.8l11.7,17.1V91.8H223.1z"></path>
|
165 |
+
<path d="M243.8,93.7h-6.5v19h-2.1v-19h-6.5v-2h15V93.7z"></path>
|
166 |
+
<path d="M261.8,110.8v2h-12.3v-21h12.2v2h-10v7.4h9.3v2h-9.3v7.6H261.8z"></path>
|
167 |
+
<path d="M279.8,110.8v2h-11.7v-21h2.1v19H279.8z"></path>
|
168 |
+
<path d="M297.2,110.8v2h-11.7v-21h2.1v19H297.2z"></path>
|
169 |
+
<path d="M305,91.8v21h-2.1v-21H305z"></path>
|
170 |
+
<path d="M332.6,103.9c0,5-3.8,9.3-10.3,9.3c-6.5,0-11-4.9-11-10.9c0-6,4.6-10.9,11-10.9c3.9,0,7.3,2.1,9.1,5.2l-1.9,1.1
|
171 |
+
c-1.3-2.5-4.1-4.2-7.2-4.2c-5.3,0-8.9,3.9-8.9,8.8c0,4.9,3.6,8.8,8.9,8.8c4.9,0,7.7-2.8,8.1-6.3h-8.3v-2h10.5V103.9z"></path>
|
172 |
+
<path d="M351.2,110.8v2h-12.3v-21H351v2h-10v7.4h9.3v2H341v7.6H351.2z"></path>
|
173 |
+
<path d="M373.1,91.8v21h-1.8l-11.7-17.1v17.1h-2.1v-21h1.8l11.7,17.1V91.8H373.1z"></path>
|
174 |
+
<path d="M379.4,102.3c0-6,4.6-10.9,11-10.9c3.9,0,7.3,2,9.1,5.2l-1.9,1.1c-1.3-2.5-4.1-4.2-7.2-4.2c-5.3,0-8.9,3.9-8.9,8.8
|
175 |
+
c0,4.9,3.6,8.8,8.9,8.8c3.1,0,5.9-1.7,7.2-4.2l1.9,1c-1.7,3.1-5.2,5.2-9.1,5.2C383.9,113.1,379.4,108.3,379.4,102.3z"></path>
|
176 |
+
<path d="M417.9,110.8v2h-12.3v-21h12.2v2h-10v7.4h9.3v2h-9.3v7.6H417.9z"></path>
|
177 |
+
</g>
|
178 |
+
</svg>
|
179 |
+
</a>
|
180 |
+
"""
|