Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Add Japanese translation by Claude
Browse files- app.py +26 -2
- src/about.py +13 -0
- src/display/css_html_js.py +2 -2
- style.css +60 -0
app.py
CHANGED
@@ -11,6 +11,7 @@ from src.about import (
|
|
11 |
CITATION_BUTTON_TEXT,
|
12 |
EVALUATION_QUEUE_TEXT,
|
13 |
INTRODUCTION_TEXT,
|
|
|
14 |
LLM_BENCHMARKS_TEXT,
|
15 |
TITLE,
|
16 |
)
|
@@ -498,9 +499,25 @@ with gr.Blocks() as demo_submission:
|
|
498 |
|
499 |
# Main demo
|
500 |
|
501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
gr.HTML(TITLE)
|
503 |
-
gr.Markdown(
|
504 |
|
505 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
506 |
with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
|
@@ -523,6 +540,13 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
|
|
523 |
)
|
524 |
gr.HTML(BOTTOM_LOGO)
|
525 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
|
527 |
if __name__ == "__main__":
|
528 |
if os.getenv("SPACE_ID"):
|
|
|
11 |
CITATION_BUTTON_TEXT,
|
12 |
EVALUATION_QUEUE_TEXT,
|
13 |
INTRODUCTION_TEXT,
|
14 |
+
INTRODUCTION_TEXT_JP,
|
15 |
LLM_BENCHMARKS_TEXT,
|
16 |
TITLE,
|
17 |
)
|
|
|
499 |
|
500 |
# Main demo
|
501 |
|
502 |
+
|
503 |
+
def update_language(language: str) -> gr.Markdown:
|
504 |
+
if language == "🇺🇸 EN":
|
505 |
+
return gr.Markdown(value=INTRODUCTION_TEXT)
|
506 |
+
else:
|
507 |
+
return gr.Markdown(value=INTRODUCTION_TEXT_JP)
|
508 |
+
|
509 |
+
|
510 |
+
with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Base()) as demo:
|
511 |
+
with gr.Row(elem_classes="language-switch-container"):
|
512 |
+
language = gr.Radio(
|
513 |
+
choices=["🇯🇵 JP", "🇺🇸 EN"],
|
514 |
+
value="🇯🇵 JP",
|
515 |
+
elem_classes="language-switch-radio",
|
516 |
+
show_label=False,
|
517 |
+
)
|
518 |
+
|
519 |
gr.HTML(TITLE)
|
520 |
+
introduction_text = gr.Markdown(INTRODUCTION_TEXT_JP, elem_classes="markdown-text")
|
521 |
|
522 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
523 |
with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
|
|
|
540 |
)
|
541 |
gr.HTML(BOTTOM_LOGO)
|
542 |
|
543 |
+
language.change(
|
544 |
+
fn=update_language,
|
545 |
+
inputs=language,
|
546 |
+
outputs=introduction_text,
|
547 |
+
api_name=False,
|
548 |
+
)
|
549 |
+
|
550 |
|
551 |
if __name__ == "__main__":
|
552 |
if os.getenv("SPACE_ID"):
|
src/about.py
CHANGED
@@ -87,6 +87,19 @@ please consult the __"About"__ page or refer to the website of
|
|
87 |
__[LLM-Jp](https://llm-jp.nii.ac.jp/en/)__. And on the __"Submit here!"__ page, you can
|
88 |
evaluate the performance of your model, and be part of the leaderboard.
|
89 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
# Which evaluations are you running? how can people reproduce what you have?
|
92 |
LLM_BENCHMARKS_TEXT = """
|
|
|
87 |
__[LLM-Jp](https://llm-jp.nii.ac.jp/en/)__. And on the __"Submit here!"__ page, you can
|
88 |
evaluate the performance of your model, and be part of the leaderboard.
|
89 |
"""
|
90 |
+
INTRODUCTION_TEXT_JP = """\
|
91 |
+
__[LLM-Jp](https://llm-jp.nii.ac.jp/)__ による __オープン日本語LLMリーダーボード__ は、\
|
92 |
+
古典的なものから最新のものまで16以上のNLPタスクを用いて日本語大規模言語モデル(LLM)の\
|
93 |
+
性能を評価します。__オープン日本語LLMリーダーボード__ は、東京の国立情報学研究所の支援を\
|
94 |
+
受けて日本語LLMの研究開発を行う組織横断プロジェクト __[LLM-Jp](https://llm-jp.nii.ac.jp/)__ \
|
95 |
+
のオープンソース貢献者によって構築されました。
|
96 |
+
|
97 |
+
__「LLMベンチマーク」__ ページでは、疑問符 **「?」** はHugging Faceのモデルカードで不明な\
|
98 |
+
パラメータを示しています。データセットに関する詳細情報については、__「About」__ ページを\
|
99 |
+
参照するか、__[LLM-Jp](https://llm-jp.nii.ac.jp/)__ のウェブサイトをご覧ください。\
|
100 |
+
また、__「Submit here!」__ ページでは、あなたのモデルの性能を評価し、リーダーボードに\
|
101 |
+
参加することができます。
|
102 |
+
"""
|
103 |
|
104 |
# Which evaluations are you running? how can people reproduce what you have?
|
105 |
LLM_BENCHMARKS_TEXT = """
|
src/display/css_html_js.py
CHANGED
@@ -33,7 +33,7 @@ custom_css = """
|
|
33 |
background: none;
|
34 |
border: none;
|
35 |
}
|
36 |
-
|
37 |
#search-bar {
|
38 |
padding: 0px;
|
39 |
}
|
@@ -77,7 +77,7 @@ table th:first-child {
|
|
77 |
#filter_type label > .wrap{
|
78 |
width: 103px;
|
79 |
}
|
80 |
-
#filter_type label > .wrap .wrap-inner{
|
81 |
padding: 2px;
|
82 |
}
|
83 |
#filter_type label > .wrap .wrap-inner input{
|
|
|
33 |
background: none;
|
34 |
border: none;
|
35 |
}
|
36 |
+
|
37 |
#search-bar {
|
38 |
padding: 0px;
|
39 |
}
|
|
|
77 |
#filter_type label > .wrap{
|
78 |
width: 103px;
|
79 |
}
|
80 |
+
#filter_type label > .wrap .wrap-inner{
|
81 |
padding: 2px;
|
82 |
}
|
83 |
#filter_type label > .wrap .wrap-inner input{
|
style.css
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.language-switch-container {
|
2 |
+
position: absolute;
|
3 |
+
top: 10px;
|
4 |
+
right: 10px;
|
5 |
+
z-index: 1000;
|
6 |
+
width: auto;
|
7 |
+
}
|
8 |
+
|
9 |
+
#space-title {
|
10 |
+
margin-top: 50px; /* Add margin to the top of the title */
|
11 |
+
}
|
12 |
+
|
13 |
+
.language-switch-radio {
|
14 |
+
display: inline-flex !important;
|
15 |
+
gap: 0 !important;
|
16 |
+
border: 1px solid var(--border-color-primary);
|
17 |
+
border-radius: 4px;
|
18 |
+
overflow: hidden;
|
19 |
+
background-color: var(--background-fill-primary);
|
20 |
+
}
|
21 |
+
|
22 |
+
.language-switch-radio .gr-form {
|
23 |
+
display: contents;
|
24 |
+
}
|
25 |
+
|
26 |
+
.language-switch-radio .gr-radio-row {
|
27 |
+
display: contents;
|
28 |
+
}
|
29 |
+
|
30 |
+
.language-switch-radio .gr-radio-row > div {
|
31 |
+
display: contents;
|
32 |
+
}
|
33 |
+
|
34 |
+
.language-switch-radio input[type="radio"] {
|
35 |
+
display: none;
|
36 |
+
}
|
37 |
+
|
38 |
+
.language-switch-radio label {
|
39 |
+
padding: 5px 10px;
|
40 |
+
font-size: 14px;
|
41 |
+
min-width: 60px;
|
42 |
+
text-align: center;
|
43 |
+
cursor: pointer;
|
44 |
+
transition: background-color 0.3s, color 0.3s;
|
45 |
+
display: inline-block;
|
46 |
+
color: var(--body-text-color);
|
47 |
+
}
|
48 |
+
|
49 |
+
.language-switch-radio input[type="radio"]:checked + label {
|
50 |
+
background-color: var(--primary-500);
|
51 |
+
color: var(--background-fill-primary);
|
52 |
+
}
|
53 |
+
|
54 |
+
.language-switch-radio label:hover {
|
55 |
+
background-color: var(--background-fill-secondary);
|
56 |
+
}
|
57 |
+
|
58 |
+
.language-switch-radio input[type="radio"]:checked + label:hover {
|
59 |
+
background-color: var(--primary-600);
|
60 |
+
}
|