huseinzol05
commited on
Commit
β’
3607302
1
Parent(s):
66b4965
fix app
Browse files- app.py +9 -0
- css_html_js.py +111 -0
app.py
CHANGED
@@ -6,6 +6,15 @@ TITLE = """<h1 align="center" id="space-title">π²πΎ Malaysian Embedding Lead
|
|
6 |
|
7 |
INTRODUCTION_TEXT = """
|
8 |
π The π²πΎ Malaysian Embedding Leaderboard aims to track, rank and evaluate Top-k retrieval using embedding models. All notebooks at https://github.com/mesolitica/embedding-benchmarks, feel free to submit your own score at https://huggingface.co/spaces/mesolitica/Malaysian-Embedding-Leaderboard/discussions with link to the notebook.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
"""
|
10 |
|
11 |
demo = gr.Blocks(css=custom_css)
|
|
|
6 |
|
7 |
INTRODUCTION_TEXT = """
|
8 |
π The π²πΎ Malaysian Embedding Leaderboard aims to track, rank and evaluate Top-k retrieval using embedding models. All notebooks at https://github.com/mesolitica/embedding-benchmarks, feel free to submit your own score at https://huggingface.co/spaces/mesolitica/Malaysian-Embedding-Leaderboard/discussions with link to the notebook.
|
9 |
+
|
10 |
+
## Dataset
|
11 |
+
|
12 |
+
π We evaluate models based on 4 datasets,
|
13 |
+
|
14 |
+
1. CrossRef Melayu related DOI, https://huggingface.co/datasets/mesolitica/malaysian-ultrachat/resolve/main/ultrachat-crossref-melayu-malay.jsonl
|
15 |
+
2. Epenerbitan, https://huggingface.co/datasets/mesolitica/malaysian-ultrachat/resolve/main/ultrachat-epenerbitan-malay.jsonl
|
16 |
+
3. gov.my PDF files, https://huggingface.co/datasets/mesolitica/malaysian-ultrachat/resolve/main/ultrachat-gov.my.jsonl
|
17 |
+
4. lom.agc.gov.my PDF files, https://huggingface.co/datasets/mesolitica/malaysian-ultrachat/resolve/main/ultrachat-lom-agc.jsonl
|
18 |
"""
|
19 |
|
20 |
demo = gr.Blocks(css=custom_css)
|
css_html_js.py
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/* Hides the final AutoEvalColumn */
|
42 |
+
#llm-benchmark-tab-table table td:last-child,
|
43 |
+
#llm-benchmark-tab-table table th:last-child {
|
44 |
+
display: none;
|
45 |
+
}
|
46 |
+
|
47 |
+
/* Limit the width of the first AutoEvalColumn so that names don't expand too much */
|
48 |
+
table td:first-child,
|
49 |
+
table th:first-child {
|
50 |
+
max-width: 400px;
|
51 |
+
overflow: auto;
|
52 |
+
white-space: nowrap;
|
53 |
+
}
|
54 |
+
|
55 |
+
.tab-buttons button {
|
56 |
+
font-size: 20px;
|
57 |
+
}
|
58 |
+
|
59 |
+
#scale-logo {
|
60 |
+
border-style: none !important;
|
61 |
+
box-shadow: none;
|
62 |
+
display: block;
|
63 |
+
margin-left: auto;
|
64 |
+
margin-right: auto;
|
65 |
+
max-width: 600px;
|
66 |
+
}
|
67 |
+
|
68 |
+
#scale-logo .download {
|
69 |
+
display: none;
|
70 |
+
}
|
71 |
+
#filter_type{
|
72 |
+
border: 0;
|
73 |
+
padding-left: 0;
|
74 |
+
padding-top: 0;
|
75 |
+
}
|
76 |
+
#filter_type label {
|
77 |
+
display: flex;
|
78 |
+
}
|
79 |
+
#filter_type label > span{
|
80 |
+
margin-top: var(--spacing-lg);
|
81 |
+
margin-right: 0.5em;
|
82 |
+
}
|
83 |
+
#filter_type label > .wrap{
|
84 |
+
width: 103px;
|
85 |
+
}
|
86 |
+
#filter_type label > .wrap .wrap-inner{
|
87 |
+
padding: 2px;
|
88 |
+
}
|
89 |
+
#filter_type label > .wrap .wrap-inner input{
|
90 |
+
width: 1px
|
91 |
+
}
|
92 |
+
#filter-columns-type{
|
93 |
+
border:0;
|
94 |
+
padding:0.5;
|
95 |
+
}
|
96 |
+
#filter-columns-size{
|
97 |
+
border:0;
|
98 |
+
padding:0.5;
|
99 |
+
}
|
100 |
+
#box-filter > .form{
|
101 |
+
border: 0
|
102 |
+
}
|
103 |
+
"""
|
104 |
+
|
105 |
+
get_window_url_params = """
|
106 |
+
function(url_params) {
|
107 |
+
const params = new URLSearchParams(window.location.search);
|
108 |
+
url_params = Object.fromEntries(params);
|
109 |
+
return url_params;
|
110 |
+
}
|
111 |
+
"""
|