File size: 2,550 Bytes
577164e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import gradio as gr
import pandas as pd

from create_table import create


# ํ…Œ์ด๋ธ” ์—…๋ฐ์ดํŠธ
def refresh():
    table1, table2, table3 = create()
    return table1, table2, table3


with gr.Blocks() as demo:
    # ํ…Œ์ด๋ธ” ์ดˆ๊ธฐํ™”
    table1, table2, table3 = create()
    with gr.Row():
        gr.Markdown(
            """
            # ๐Ÿ† Iris Translation Leaderboard
            Iris Translation is a project designed to evaluate Korean-to-English translation models
            
            ## github
            - https://github.com/davidkim205/translation

            ## How to add model
            If you want to add a new model, please write the model name and template in the [github issue](https://github.com/davidkim205/translation/issues).

            ## evaluation criteria
            - **Bleu**: average bleu score
            - **SBleu**: Self-Bleu(double translation evaluation)
            - **Bleu-SL**: bleu by sentence length
            - **Duplicate**: count of repetitive sentence generation
            - **Length Exceeds**: count of mismatches in translated sentence lengths exceeding the threshold
            """
        )
    with gr.Row():
        with gr.Tab("bleu and sbleu"):
            with gr.Group():
                table1 = gr.Dataframe(value=table1, datatype="html")
                with gr.Accordion("Show Chart", open=False):
                    gr.Image(
                        "assets/plot-bleu.png",
                        show_download_button=False,
                        container=False,
                    )
        with gr.Tab("bleu by src"):
            with gr.Group():
                table2 = gr.Dataframe(value=table2, datatype="html")
                with gr.Accordion("Show Chart", open=False):
                    gr.Image(
                        "assets/plot-bleu-by-src.png",
                        show_download_button=False,
                        container=False,
                    )
        with gr.Tab("bleu by sentence length"):
            with gr.Group():
                table3 = gr.Dataframe(value=table3, datatype="html")
                with gr.Accordion("Show Chart", open=False):
                    gr.Image(
                        "assets/plot-bleu-by-sentence-length.png",
                        show_download_button=False,
                        container=False,
                    )

    refresh_btn = gr.Button(value="Refresh")
    refresh_btn.click(refresh, outputs=[table1, table2, table3])

demo.launch(server_name='0.0.0.0', share=True)