Marcelo Lotif
commited on
Commit
·
66f1c0c
1
Parent(s):
87fef00
First few changes
Browse files- app.py +12 -6
- src/assets/logo-icon.png +0 -0
- src/display/css_html_js.py +40 -0
app.py
CHANGED
@@ -73,12 +73,18 @@ def init_leaderboard(dataframe, benchmark_type):
|
|
73 |
)
|
74 |
|
75 |
|
76 |
-
demo = gr.Blocks(css=custom_css)
|
77 |
with demo:
|
78 |
gr.HTML(f"""
|
79 |
-
<div style="text-align:center; margin-bottom:1rem;">
|
80 |
-
<
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
</div>
|
83 |
""")
|
84 |
# gr.HTML(TITLE)
|
@@ -86,7 +92,7 @@ with demo:
|
|
86 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
87 |
# gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
88 |
|
89 |
-
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
90 |
with gr.TabItem("Base Benchmark", elem_id="llm-benchmark-tab-table", id=0):
|
91 |
leaderboard = init_leaderboard(ST_LEADERBOARD_DF, "base")
|
92 |
|
@@ -100,4 +106,4 @@ with demo:
|
|
100 |
scheduler = BackgroundScheduler()
|
101 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
102 |
scheduler.start()
|
103 |
-
demo.queue(default_concurrency_limit=40).launch()
|
|
|
73 |
)
|
74 |
|
75 |
|
76 |
+
demo = gr.Blocks(css=custom_css, theme=gr.themes.Default(primary_hue=gr.themes.colors.pink))
|
77 |
with demo:
|
78 |
gr.HTML(f"""
|
79 |
+
<div id="page-header" style="text-align:center; margin-bottom:1rem;">
|
80 |
+
<div id="left-container">
|
81 |
+
<img src="/gradio_api/file=src/assets/logo-icon.png">
|
82 |
+
</div>
|
83 |
+
<div id="centre-container">
|
84 |
+
<h1 style="margin-bottom: 0.25rem;">{TITLE}</h1>
|
85 |
+
<p style="color:#eb088a; margin:0; font-size:1.2rem;">Performance Insights & Comparison</p>
|
86 |
+
</div>
|
87 |
+
<div id="right-container"></div>
|
88 |
</div>
|
89 |
""")
|
90 |
# gr.HTML(TITLE)
|
|
|
92 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
93 |
# gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
94 |
|
95 |
+
with gr.Tabs(elem_classes=["leaderboard-table", "tab-buttons"]) as tabs:
|
96 |
with gr.TabItem("Base Benchmark", elem_id="llm-benchmark-tab-table", id=0):
|
97 |
leaderboard = init_leaderboard(ST_LEADERBOARD_DF, "base")
|
98 |
|
|
|
106 |
scheduler = BackgroundScheduler()
|
107 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
108 |
scheduler.start()
|
109 |
+
demo.queue(default_concurrency_limit=40).launch(allowed_paths=["src/assets/logo-icon.png"])
|
src/assets/logo-icon.png
ADDED
![]() |
src/display/css_html_js.py
CHANGED
@@ -221,7 +221,47 @@ custom_css = """
|
|
221 |
font-size: 20px;
|
222 |
}
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
"""
|
227 |
|
|
|
221 |
font-size: 20px;
|
222 |
}
|
223 |
|
224 |
+
.intro-block {
|
225 |
+
padding: 20px;
|
226 |
+
}
|
227 |
+
|
228 |
+
table.table {
|
229 |
+
font-family: var(--font);
|
230 |
+
}
|
231 |
+
|
232 |
+
.header-row {
|
233 |
+
height: 0;
|
234 |
+
min-height: 0;
|
235 |
+
}
|
236 |
+
|
237 |
+
.tabitem {
|
238 |
+
padding-top: 0;
|
239 |
+
}
|
240 |
+
|
241 |
+
.html-container {
|
242 |
+
padding: 0;
|
243 |
+
}
|
244 |
|
245 |
+
#page-header {
|
246 |
+
display: flex;
|
247 |
+
}
|
248 |
+
|
249 |
+
#left-container {
|
250 |
+
flex: 1;
|
251 |
+
}
|
252 |
+
|
253 |
+
#left-container img {
|
254 |
+
height: 150px;
|
255 |
+
width: 150px;
|
256 |
+
}
|
257 |
+
|
258 |
+
#centre-container {
|
259 |
+
align-self: center;
|
260 |
+
}
|
261 |
+
|
262 |
+
#right-container {
|
263 |
+
flex: 1;
|
264 |
+
}
|
265 |
|
266 |
"""
|
267 |
|