Tom Aarsen commited on
Commit
56def8a
1 Parent(s): bd6a61b

Refactor gradio Tabs initialization

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +343 -786
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ *.pyc
app.py CHANGED
@@ -23,7 +23,7 @@ TASKS = [
23
  ]
24
 
25
  TASK_LIST_BITEXT_MINING = ['BUCC (de-en)', 'BUCC (fr-en)', 'BUCC (ru-en)', 'BUCC (zh-en)', 'Tatoeba (afr-eng)', 'Tatoeba (amh-eng)', 'Tatoeba (ang-eng)', 'Tatoeba (ara-eng)', 'Tatoeba (arq-eng)', 'Tatoeba (arz-eng)', 'Tatoeba (ast-eng)', 'Tatoeba (awa-eng)', 'Tatoeba (aze-eng)', 'Tatoeba (bel-eng)', 'Tatoeba (ben-eng)', 'Tatoeba (ber-eng)', 'Tatoeba (bos-eng)', 'Tatoeba (bre-eng)', 'Tatoeba (bul-eng)', 'Tatoeba (cat-eng)', 'Tatoeba (cbk-eng)', 'Tatoeba (ceb-eng)', 'Tatoeba (ces-eng)', 'Tatoeba (cha-eng)', 'Tatoeba (cmn-eng)', 'Tatoeba (cor-eng)', 'Tatoeba (csb-eng)', 'Tatoeba (cym-eng)', 'Tatoeba (dan-eng)', 'Tatoeba (deu-eng)', 'Tatoeba (dsb-eng)', 'Tatoeba (dtp-eng)', 'Tatoeba (ell-eng)', 'Tatoeba (epo-eng)', 'Tatoeba (est-eng)', 'Tatoeba (eus-eng)', 'Tatoeba (fao-eng)', 'Tatoeba (fin-eng)', 'Tatoeba (fra-eng)', 'Tatoeba (fry-eng)', 'Tatoeba (gla-eng)', 'Tatoeba (gle-eng)', 'Tatoeba (glg-eng)', 'Tatoeba (gsw-eng)', 'Tatoeba (heb-eng)', 'Tatoeba (hin-eng)', 'Tatoeba (hrv-eng)', 'Tatoeba (hsb-eng)', 'Tatoeba (hun-eng)', 'Tatoeba (hye-eng)', 'Tatoeba (ido-eng)', 'Tatoeba (ile-eng)', 'Tatoeba (ina-eng)', 'Tatoeba (ind-eng)', 'Tatoeba (isl-eng)', 'Tatoeba (ita-eng)', 'Tatoeba (jav-eng)', 'Tatoeba (jpn-eng)', 'Tatoeba (kab-eng)', 'Tatoeba (kat-eng)', 'Tatoeba (kaz-eng)', 'Tatoeba (khm-eng)', 'Tatoeba (kor-eng)', 'Tatoeba (kur-eng)', 'Tatoeba (kzj-eng)', 'Tatoeba (lat-eng)', 'Tatoeba (lfn-eng)', 'Tatoeba (lit-eng)', 'Tatoeba (lvs-eng)', 'Tatoeba (mal-eng)', 'Tatoeba (mar-eng)', 'Tatoeba (max-eng)', 'Tatoeba (mhr-eng)', 'Tatoeba (mkd-eng)', 'Tatoeba (mon-eng)', 'Tatoeba (nds-eng)', 'Tatoeba (nld-eng)', 'Tatoeba (nno-eng)', 'Tatoeba (nob-eng)', 'Tatoeba (nov-eng)', 'Tatoeba (oci-eng)', 'Tatoeba (orv-eng)', 'Tatoeba (pam-eng)', 'Tatoeba (pes-eng)', 'Tatoeba (pms-eng)', 'Tatoeba (pol-eng)', 'Tatoeba (por-eng)', 'Tatoeba (ron-eng)', 'Tatoeba (rus-eng)', 'Tatoeba (slk-eng)', 'Tatoeba (slv-eng)', 'Tatoeba (spa-eng)', 'Tatoeba (sqi-eng)', 'Tatoeba (srp-eng)', 'Tatoeba (swe-eng)', 'Tatoeba (swg-eng)', 'Tatoeba (swh-eng)', 'Tatoeba (tam-eng)', 'Tatoeba (tat-eng)', 'Tatoeba (tel-eng)', 'Tatoeba (tgl-eng)', 'Tatoeba (tha-eng)', 'Tatoeba (tuk-eng)', 'Tatoeba (tur-eng)', 'Tatoeba (tzl-eng)', 'Tatoeba (uig-eng)', 'Tatoeba (ukr-eng)', 'Tatoeba (urd-eng)', 'Tatoeba (uzb-eng)', 'Tatoeba (vie-eng)', 'Tatoeba (war-eng)', 'Tatoeba (wuu-eng)', 'Tatoeba (xho-eng)', 'Tatoeba (yid-eng)', 'Tatoeba (yue-eng)', 'Tatoeba (zsm-eng)']
26
- TASK_LIST_BITEXT_MINING_OTHER = ["BornholmBitextMining"]
27
 
28
  TASK_LIST_CLASSIFICATION = [
29
  "AmazonCounterfactualClassification (en)",
@@ -1027,7 +1027,7 @@ def add_task(examples):
1027
  examples["mteb_task"] = "STS"
1028
  elif examples["mteb_dataset_name"] in norm(TASK_LIST_SUMMARIZATION + TASK_LIST_SUMMARIZATION_FR):
1029
  examples["mteb_task"] = "Summarization"
1030
- elif examples["mteb_dataset_name"] in norm(TASK_LIST_BITEXT_MINING + TASK_LIST_BITEXT_MINING_OTHER):
1031
  examples["mteb_task"] = "BitextMining"
1032
  else:
1033
  print("WARNING: Task not found for dataset", examples["mteb_dataset_name"])
@@ -1427,7 +1427,7 @@ get_mteb_average_fr()
1427
  get_mteb_average_pl()
1428
  get_mteb_average_zh()
1429
  DATA_BITEXT_MINING = get_mteb_data(["BitextMining"], [], TASK_LIST_BITEXT_MINING)
1430
- DATA_BITEXT_MINING_OTHER = get_mteb_data(["BitextMining"], [], TASK_LIST_BITEXT_MINING_OTHER)
1431
  DATA_CLASSIFICATION_DA = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_DA)
1432
  DATA_CLASSIFICATION_NB = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_NB)
1433
  DATA_CLASSIFICATION_SV = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_SV)
@@ -1442,7 +1442,7 @@ MODELS = []
1442
  # LANGUAGES = []
1443
  for d in [
1444
  DATA_BITEXT_MINING,
1445
- DATA_BITEXT_MINING_OTHER,
1446
  DATA_CLASSIFICATION_EN,
1447
  DATA_CLASSIFICATION_DA,
1448
  DATA_CLASSIFICATION_FR,
@@ -1505,783 +1505,346 @@ table > tbody > tr > td:nth-child(2) > div {
1505
  }
1506
  """
1507
 
1508
- block = gr.Blocks(css=css)
1509
- with block:
1510
- gr.Markdown(f"""
1511
- Massive Text Embedding Benchmark (MTEB) Leaderboard. To submit, refer to the <a href="https://github.com/embeddings-benchmark/mteb#leaderboard" target="_blank" style="text-decoration: underline">MTEB GitHub repository</a> 🤗 Refer to the [MTEB paper](https://arxiv.org/abs/2210.07316) for details on metrics, tasks and models.
1512
- """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1513
  with gr.Tabs():
1514
- with gr.TabItem("Overall"):
1515
- with gr.TabItem("English"):
1516
- with gr.Row():
1517
- gr.Markdown("""
1518
- **Overall MTEB English leaderboard** 🔮
1519
-
1520
- - **Metric:** Various, refer to task tabs
1521
- - **Languages:** English
1522
- """)
1523
- with gr.Row():
1524
- data_overall = gr.components.Dataframe(
1525
- DATA_OVERALL,
1526
- datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL.columns),
1527
- type="pandas",
1528
- height=600,
1529
- )
1530
- with gr.Row():
1531
- data_run_overall = gr.Button("Refresh")
1532
- data_run_overall.click(get_mteb_average, inputs=None, outputs=data_overall)
1533
- with gr.TabItem("Chinese"):
1534
- with gr.Row():
1535
- gr.Markdown("""
1536
- **Overall MTEB Chinese leaderboard (C-MTEB)** 🔮🇨🇳
1537
-
1538
- - **Metric:** Various, refer to task tabs
1539
- - **Languages:** Chinese
1540
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
1541
- """)
1542
- with gr.Row():
1543
- data_overall_zh = gr.components.Dataframe(
1544
- DATA_OVERALL_ZH,
1545
- datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_ZH.columns),
1546
- type="pandas",
1547
- height=600,
1548
- )
1549
- with gr.Row():
1550
- data_run_overall_zh = gr.Button("Refresh")
1551
- data_run_overall_zh.click(get_mteb_average_zh, inputs=None, outputs=data_overall_zh)
1552
- with gr.TabItem("French"):
1553
- with gr.Row():
1554
- gr.Markdown("""
1555
- **Overall MTEB French leaderboard (F-MTEB)** 🔮🇫🇷
1556
-
1557
- - **Metric:** Various, refer to task tabs
1558
- - **Languages:** French
1559
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [Wissam Siblini](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
1560
- """)
1561
- with gr.Row():
1562
- data_overall_fr = gr.components.Dataframe(
1563
- DATA_OVERALL_FR,
1564
- datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_FR.columns),
1565
- type="pandas",
1566
- height=600,
1567
- )
1568
- with gr.Row():
1569
- data_overall_fr = gr.Button("Refresh")
1570
- data_overall_fr.click(get_mteb_average_fr, inputs=None, outputs=data_overall_fr)
1571
- with gr.TabItem("Polish"):
1572
- with gr.Row():
1573
- gr.Markdown("""
1574
- **Overall MTEB Polish leaderboard (PL-MTEB)** 🔮🇵🇱
1575
-
1576
- - **Metric:** Various, refer to task tabs
1577
- - **Languages:** Polish
1578
- - **Credits:** [Rafał Poświata](https://github.com/rafalposwiata), [Konrad Wojtasik](https://github.com/kwojtasi) & [BEIR-PL](https://arxiv.org/abs/2305.19840)
1579
- """)
1580
- with gr.Row():
1581
- data_overall_pl = gr.components.Dataframe(
1582
- DATA_OVERALL_PL,
1583
- datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_PL.columns),
1584
- type="pandas",
1585
- height=600,
1586
- )
1587
- with gr.Row():
1588
- data_run_overall_pl = gr.Button("Refresh")
1589
- data_run_overall_pl.click(get_mteb_average_pl, inputs=None, outputs=data_overall_pl)
1590
- with gr.TabItem("Bitext Mining"):
1591
- with gr.TabItem("English-X"):
1592
- with gr.Row():
1593
- gr.Markdown("""
1594
- **Bitext Mining English-X Leaderboard** 🎌
1595
-
1596
- - **Metric:** [F1](https://huggingface.co/spaces/evaluate-metric/f1)
1597
- - **Languages:** 117 (Pairs of: English & other language)
1598
- """)
1599
- with gr.Row():
1600
- data_bitext_mining = gr.components.Dataframe(
1601
- DATA_BITEXT_MINING,
1602
- datatype=["number", "markdown"] + ["number"] * len(DATA_BITEXT_MINING.columns),
1603
- type="pandas",
1604
- )
1605
- with gr.Row():
1606
- data_run_bitext_mining = gr.Button("Refresh")
1607
- data_run_bitext_mining.click(
1608
- partial(get_mteb_data, tasks=["BitextMining"], datasets=TASK_LIST_BITEXT_MINING),
1609
- outputs=data_bitext_mining,
1610
- )
1611
- with gr.TabItem("Danish"):
1612
- with gr.Row():
1613
- gr.Markdown("""
1614
- **Bitext Mining Danish Leaderboard** 🎌🇩🇰
1615
-
1616
- - **Metric:** [F1](https://huggingface.co/spaces/evaluate-metric/f1)
1617
- - **Languages:** Danish & Bornholmsk (Danish Dialect)
1618
- - **Credits:** [Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)
1619
- """)
1620
- with gr.Row():
1621
- data_bitext_mining_da = gr.components.Dataframe(
1622
- DATA_BITEXT_MINING_OTHER,
1623
- datatype=["number", "markdown"] + ["number"] * len(DATA_BITEXT_MINING_OTHER.columns),
1624
- type="pandas",
1625
- )
1626
- with gr.Row():
1627
- data_run_bitext_mining_da = gr.Button("Refresh")
1628
- data_run_bitext_mining_da.click(
1629
- partial(get_mteb_data, tasks=["BitextMining"], datasets=TASK_LIST_BITEXT_MINING_OTHER),
1630
- outputs=data_bitext_mining_da,
1631
- )
1632
- with gr.TabItem("Classification"):
1633
- with gr.TabItem("English"):
1634
- with gr.Row():
1635
- gr.Markdown("""
1636
- **Classification English Leaderboard** ❤️
1637
-
1638
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1639
- - **Languages:** English
1640
- """)
1641
- with gr.Row():
1642
- data_classification_en = gr.components.Dataframe(
1643
- DATA_CLASSIFICATION_EN,
1644
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_EN.columns),
1645
- type="pandas",
1646
- )
1647
- with gr.Row():
1648
- data_run_classification_en = gr.Button("Refresh")
1649
- data_run_classification_en.click(
1650
- partial(get_mteb_data, tasks=["Classification"], langs=["en"]),
1651
- outputs=data_classification_en,
1652
- )
1653
- with gr.TabItem("Chinese"):
1654
- with gr.Row():
1655
- gr.Markdown("""
1656
- **Classification Chinese Leaderboard** 🧡🇨🇳
1657
-
1658
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1659
- - **Languages:** Chinese
1660
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
1661
- """)
1662
- with gr.Row():
1663
- data_classification_zh = gr.components.Dataframe(
1664
- DATA_CLASSIFICATION_ZH,
1665
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_ZH.columns),
1666
- type="pandas",
1667
- )
1668
- with gr.Row():
1669
- data_run_classification_zh = gr.Button("Refresh")
1670
- data_run_classification_zh.click(
1671
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_ZH),
1672
- outputs=data_classification_zh,
1673
- )
1674
- with gr.TabItem("Danish"):
1675
- with gr.Row():
1676
- gr.Markdown("""
1677
- **Classification Danish Leaderboard** 🤍🇩🇰
1678
-
1679
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1680
- - **Languages:** Danish
1681
- - **Credits:** [Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)
1682
- """)
1683
- with gr.Row():
1684
- data_classification_da = gr.components.Dataframe(
1685
- DATA_CLASSIFICATION_DA,
1686
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_DA.columns),
1687
- type="pandas",
1688
- )
1689
- with gr.Row():
1690
- data_run_classification_da = gr.Button("Refresh")
1691
- data_run_classification_da.click(
1692
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_DA),
1693
- outputs=data_run_classification_da,
1694
- )
1695
- with gr.TabItem("French"):
1696
- with gr.Row():
1697
- gr.Markdown("""
1698
- **Classification French Leaderboard** 💙🇫🇷
1699
-
1700
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1701
- - **Languages:** French
1702
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
1703
- """)
1704
- with gr.Row():
1705
- data_classification_fr = gr.components.Dataframe(
1706
- DATA_CLASSIFICATION_FR,
1707
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_FR.columns),
1708
- type="pandas",
1709
- )
1710
- with gr.Row():
1711
- data_run_classification_fr = gr.Button("Refresh")
1712
- data_run_classification_fr.click(
1713
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_FR),
1714
- outputs=data_run_classification_fr,
1715
- )
1716
- with gr.TabItem("Norwegian"):
1717
- with gr.Row():
1718
- gr.Markdown("""
1719
- **Classification Norwegian Leaderboard** 💙🇳🇴
1720
-
1721
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1722
- - **Languages:** Norwegian Bokmål
1723
- - **Credits:** [Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)
1724
- """)
1725
- with gr.Row():
1726
- data_classification_nb = gr.components.Dataframe(
1727
- DATA_CLASSIFICATION_NB,
1728
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_NB.columns),
1729
- type="pandas",
1730
- )
1731
- with gr.Row():
1732
- data_run_classification_nb = gr.Button("Refresh")
1733
- data_run_classification_nb.click(
1734
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_NB),
1735
- outputs=data_classification_nb,
1736
- )
1737
- with gr.TabItem("Polish"):
1738
- with gr.Row():
1739
- gr.Markdown("""
1740
- **Classification Polish Leaderboard** 🤍🇵🇱
1741
-
1742
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1743
- - **Languages:** Polish
1744
- - **Credits:** [Rafał Poświata](https://github.com/rafalposwiata)
1745
- """)
1746
- with gr.Row():
1747
- data_classification_pl = gr.components.Dataframe(
1748
- DATA_CLASSIFICATION_PL,
1749
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_PL.columns),
1750
- type="pandas",
1751
- )
1752
- with gr.Row():
1753
- data_run_classification_pl = gr.Button("Refresh")
1754
- data_run_classification_pl.click(
1755
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_PL),
1756
- outputs=data_classification_pl,
1757
- )
1758
- with gr.TabItem("Swedish"):
1759
- with gr.Row():
1760
- gr.Markdown("""
1761
- **Classification Swedish Leaderboard** 💛🇸🇪
1762
-
1763
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1764
- - **Languages:** Swedish
1765
- - **Credits:** [Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)
1766
- """)
1767
- with gr.Row():
1768
- data_classification_sv = gr.components.Dataframe(
1769
- DATA_CLASSIFICATION_SV,
1770
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_SV.columns),
1771
- type="pandas",
1772
- )
1773
- with gr.Row():
1774
- data_run_classification_sv = gr.Button("Refresh")
1775
- data_run_classification_sv.click(
1776
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_SV),
1777
- outputs=data_classification_sv,
1778
- )
1779
- with gr.TabItem("Other"):
1780
- with gr.Row():
1781
- gr.Markdown("""
1782
- **Classification Other Languages Leaderboard** 💜💚💙
1783
-
1784
- - **Metric:** [Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)
1785
- - **Languages:** 47 (Only languages not included in the other tabs)
1786
- """)
1787
- with gr.Row():
1788
- data_classification = gr.components.Dataframe(
1789
- DATA_CLASSIFICATION_OTHER,
1790
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLASSIFICATION_OTHER) * 10,
1791
- type="pandas",
1792
- )
1793
- with gr.Row():
1794
- data_run_classification = gr.Button("Refresh")
1795
- data_run_classification.click(
1796
- partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_OTHER),
1797
- outputs=data_classification,
1798
- )
1799
- with gr.TabItem("Clustering"):
1800
- with gr.TabItem("English"):
1801
- with gr.Row():
1802
- gr.Markdown("""
1803
- **Clustering Leaderboard** ✨
1804
-
1805
- - **Metric:** Validity Measure (v_measure)
1806
- - **Languages:** English
1807
- """)
1808
- with gr.Row():
1809
- data_clustering = gr.components.Dataframe(
1810
- DATA_CLUSTERING,
1811
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLUSTERING.columns),
1812
- type="pandas",
1813
- )
1814
- with gr.Row():
1815
- data_run_clustering_en = gr.Button("Refresh")
1816
- data_run_clustering_en.click(
1817
- partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING),
1818
- outputs=data_clustering,
1819
- )
1820
- with gr.TabItem("Chinese"):
1821
- with gr.Row():
1822
- gr.Markdown("""
1823
- **Clustering Chinese Leaderboard** ✨🇨🇳
1824
-
1825
- - **Metric:** Validity Measure (v_measure)
1826
- - **Languages:** Chinese
1827
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
1828
- """)
1829
- with gr.Row():
1830
- data_clustering_zh = gr.components.Dataframe(
1831
- DATA_CLUSTERING_ZH,
1832
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLUSTERING_ZH.columns),
1833
- type="pandas",
1834
- )
1835
- with gr.Row():
1836
- data_run_clustering_zh = gr.Button("Refresh")
1837
- data_run_clustering_zh.click(
1838
- partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_ZH),
1839
- outputs=data_clustering_zh,
1840
- )
1841
- with gr.TabItem("French"):
1842
- with gr.Row():
1843
- gr.Markdown("""
1844
- **Clustering French Leaderboard** ✨🇫🇷
1845
-
1846
- - **Metric:** Validity Measure (v_measure)
1847
- - **Languages:** French
1848
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
1849
- """)
1850
- with gr.Row():
1851
- data_clustering_fr = gr.components.Dataframe(
1852
- DATA_CLUSTERING_FR,
1853
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLUSTERING_FR.columns),
1854
- type="pandas",
1855
- )
1856
- with gr.Row():
1857
- data_run_clustering_fr = gr.Button("Refresh")
1858
- data_run_clustering_fr.click(
1859
- partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_FR),
1860
- outputs=data_clustering_fr,
1861
- )
1862
- with gr.TabItem("German"):
1863
- with gr.Row():
1864
- gr.Markdown("""
1865
- **Clustering German Leaderboard** ✨🇩🇪
1866
-
1867
- - **Metric:** Validity Measure (v_measure)
1868
- - **Languages:** German
1869
- - **Credits:** [Silvan](https://github.com/slvnwhrl)
1870
- """)
1871
- with gr.Row():
1872
- data_clustering_de = gr.components.Dataframe(
1873
- DATA_CLUSTERING_DE,
1874
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLUSTERING_DE.columns) * 2,
1875
- type="pandas",
1876
- )
1877
- with gr.Row():
1878
- data_run_clustering_de = gr.Button("Refresh")
1879
- data_run_clustering_de.click(
1880
- partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_DE),
1881
- outputs=data_clustering_de,
1882
- )
1883
- with gr.TabItem("Polish"):
1884
- with gr.Row():
1885
- gr.Markdown("""
1886
- **Clustering Polish Leaderboard** ✨🇵🇱
1887
-
1888
- - **Metric:** Validity Measure (v_measure)
1889
- - **Languages:** Polish
1890
- - **Credits:** [Rafał Poświata](https://github.com/rafalposwiata)
1891
- """)
1892
- with gr.Row():
1893
- data_clustering_pl = gr.components.Dataframe(
1894
- DATA_CLUSTERING_PL,
1895
- datatype=["number", "markdown"] + ["number"] * len(DATA_CLUSTERING_PL.columns) * 2,
1896
- type="pandas",
1897
- )
1898
- with gr.Row():
1899
- data_run_clustering_pl = gr.Button("Refresh")
1900
- data_run_clustering_pl.click(
1901
- partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_PL),
1902
- outputs=data_clustering_pl,
1903
- )
1904
- with gr.TabItem("Pair Classification"):
1905
- with gr.TabItem("English"):
1906
- with gr.Row():
1907
- gr.Markdown("""
1908
- **Pair Classification English Leaderboard** 🎭
1909
-
1910
- - **Metric:** Average Precision based on Cosine Similarities (cos_sim_ap)
1911
- - **Languages:** English
1912
- """)
1913
- with gr.Row():
1914
- data_pair_classification = gr.components.Dataframe(
1915
- DATA_PAIR_CLASSIFICATION,
1916
- datatype=["number", "markdown"] + ["number"] * len(DATA_PAIR_CLASSIFICATION.columns),
1917
- type="pandas",
1918
- )
1919
- with gr.Row():
1920
- data_run_pair_classification = gr.Button("Refresh")
1921
- data_run_pair_classification.click(
1922
- partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION),
1923
- outputs=data_pair_classification,
1924
- )
1925
- with gr.TabItem("Chinese"):
1926
- with gr.Row():
1927
- gr.Markdown("""
1928
- **Pair Classification Chinese Leaderboard** 🎭🇨🇳
1929
-
1930
- - **Metric:** Average Precision based on Cosine Similarities (cos_sim_ap)
1931
- - **Languages:** Chinese
1932
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
1933
- """)
1934
- with gr.Row():
1935
- data_pair_classification_zh = gr.components.Dataframe(
1936
- DATA_PAIR_CLASSIFICATION_ZH,
1937
- datatype=["number", "markdown"] + ["number"] * len(DATA_PAIR_CLASSIFICATION_ZH.columns),
1938
- type="pandas",
1939
- )
1940
- with gr.Row():
1941
- data_run_pair_classification_zh = gr.Button("Refresh")
1942
- data_run_pair_classification_zh.click(
1943
- partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_ZH),
1944
- outputs=data_pair_classification_zh,
1945
- )
1946
- with gr.TabItem("French"):
1947
- with gr.Row():
1948
- gr.Markdown("""
1949
- **Pair Classification French Leaderboard** 🎭🇫🇷
1950
-
1951
- - **Metric:** Average Precision based on Cosine Similarities (cos_sim_ap)
1952
- - **Languages:** French
1953
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
1954
- """)
1955
- with gr.Row():
1956
- data_pair_classification_fr = gr.components.Dataframe(
1957
- DATA_PAIR_CLASSIFICATION_FR,
1958
- datatype=["number", "markdown"] + ["number"] * len(DATA_PAIR_CLASSIFICATION_FR.columns),
1959
- type="pandas",
1960
- )
1961
- with gr.Row():
1962
- data_run_pair_classification_fr = gr.Button("Refresh")
1963
- data_run_pair_classification_fr.click(
1964
- partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_FR),
1965
- outputs=data_pair_classification_fr,
1966
- )
1967
- with gr.TabItem("Polish"):
1968
- with gr.Row():
1969
- gr.Markdown("""
1970
- **Pair Classification Polish Leaderboard** 🎭🇵🇱
1971
-
1972
- - **Metric:** Average Precision based on Cosine Similarities (cos_sim_ap)
1973
- - **Languages:** Polish
1974
- - **Credits:** [Rafał Poświata](https://github.com/rafalposwiata)
1975
- """)
1976
- with gr.Row():
1977
- data_pair_classification_pl = gr.components.Dataframe(
1978
- DATA_PAIR_CLASSIFICATION_PL,
1979
- datatype=["number", "markdown"] + ["number"] * len(DATA_PAIR_CLASSIFICATION_PL.columns),
1980
- type="pandas",
1981
- )
1982
- with gr.Row():
1983
- data_run_pair_classification_pl = gr.Button("Refresh")
1984
- data_run_pair_classification_pl.click(
1985
- partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_PL),
1986
- outputs=data_pair_classification_pl,
1987
- )
1988
- with gr.TabItem("Reranking"):
1989
- with gr.TabItem("English"):
1990
- with gr.Row():
1991
- gr.Markdown("""
1992
- **Reranking English Leaderboard** 🥈
1993
-
1994
- - **Metric:** Mean Average Precision (MAP)
1995
- - **Languages:** English
1996
- """)
1997
- with gr.Row():
1998
- data_reranking = gr.components.Dataframe(
1999
- DATA_RERANKING,
2000
- datatype=["number", "markdown"] + ["number"] * len(DATA_RERANKING.columns),
2001
- type="pandas",
2002
- )
2003
- with gr.Row():
2004
- data_run_reranking = gr.Button("Refresh")
2005
- data_run_reranking.click(
2006
- partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING),
2007
- outputs=data_reranking,
2008
- )
2009
- with gr.TabItem("Chinese"):
2010
- with gr.Row():
2011
- gr.Markdown("""
2012
- **Reranking Chinese Leaderboard** 🥈🇨🇳
2013
-
2014
- - **Metric:** Mean Average Precision (MAP)
2015
- - **Languages:** Chinese
2016
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
2017
- """)
2018
- with gr.Row():
2019
- data_reranking_zh = gr.components.Dataframe(
2020
- DATA_RERANKING_ZH,
2021
- datatype=["number", "markdown"] + ["number"] * len(DATA_RERANKING_ZH.columns),
2022
- type="pandas",
2023
- )
2024
- with gr.Row():
2025
- data_run_reranking_zh = gr.Button("Refresh")
2026
- data_run_reranking_zh.click(
2027
- partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING_ZH),
2028
- outputs=data_reranking_zh,
2029
- )
2030
- with gr.TabItem("French"):
2031
- with gr.Row():
2032
- gr.Markdown("""
2033
- **Reranking French Leaderboard** 🥈🇫🇷
2034
-
2035
- - **Metric:** Mean Average Precision (MAP)
2036
- - **Languages:** French
2037
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
2038
- """)
2039
- with gr.Row():
2040
- data_reranking_fr = gr.components.Dataframe(
2041
- DATA_RERANKING_FR,
2042
- datatype=["number", "markdown"] + ["number"] * len(DATA_RERANKING_FR.columns),
2043
- type="pandas",
2044
- )
2045
- with gr.Row():
2046
- data_run_reranking_fr = gr.Button("Refresh")
2047
- data_run_reranking_fr.click(
2048
- partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING_FR),
2049
- outputs=data_reranking_fr,
2050
- )
2051
- with gr.TabItem("Retrieval"):
2052
- with gr.TabItem("English"):
2053
- with gr.Row():
2054
- gr.Markdown("""
2055
- **Retrieval English Leaderboard** 🔎
2056
-
2057
- - **Metric:** Normalized Discounted Cumulative Gain @ k (ndcg_at_10)
2058
- - **Languages:** English
2059
- """)
2060
- with gr.Row():
2061
- data_retrieval = gr.components.Dataframe(
2062
- DATA_RETRIEVAL,
2063
- # Add support for more columns than existing as a buffer for CQADupstack & other Retrieval tasks (e.g. MSMARCOv2)
2064
- datatype=["number", "markdown"] + ["number"] * len(DATA_RETRIEVAL.columns) * 2,
2065
- type="pandas",
2066
- )
2067
- with gr.Row():
2068
- data_run_retrieval = gr.Button("Refresh")
2069
- data_run_retrieval.click(
2070
- partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL),
2071
- outputs=data_retrieval,
2072
- )
2073
- with gr.TabItem("Chinese"):
2074
- with gr.Row():
2075
- gr.Markdown("""
2076
- **Retrieval Chinese Leaderboard** 🔎🇨🇳
2077
-
2078
- - **Metric:** Normalized Discounted Cumulative Gain @ k (ndcg_at_10)
2079
- - **Languages:** Chinese
2080
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
2081
- """)
2082
- with gr.Row():
2083
- data_retrieval_zh = gr.components.Dataframe(
2084
- DATA_RETRIEVAL_ZH,
2085
- # Add support for more columns than existing as a buffer for CQADupstack & other Retrieval tasks (e.g. MSMARCOv2)
2086
- datatype=["number", "markdown"] + ["number"] * len(DATA_RETRIEVAL_ZH.columns) * 2,
2087
- type="pandas",
2088
- )
2089
- with gr.Row():
2090
- data_run_retrieval_zh = gr.Button("Refresh")
2091
- data_run_retrieval_zh.click(
2092
- partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_ZH),
2093
- outputs=data_retrieval_zh,
2094
- )
2095
- with gr.TabItem("French"):
2096
- with gr.Row():
2097
- gr.Markdown("""
2098
- **Retrieval French Leaderboard** 🔎🇫🇷
2099
-
2100
- - **Metric:** Normalized Discounted Cumulative Gain @ k (ndcg_at_10)
2101
- - **Languages:** French
2102
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
2103
- """)
2104
- with gr.Row():
2105
- data_retrieval_fr = gr.components.Dataframe(
2106
- DATA_RETRIEVAL_FR,
2107
- # Add support for more columns than existing as a buffer for CQADupstack & other Retrieval tasks (e.g. MSMARCOv2)
2108
- datatype=["number", "markdown"] + ["number"] * len(DATA_RETRIEVAL_FR.columns) * 2,
2109
- type="pandas",
2110
- )
2111
- with gr.Row():
2112
- data_run_retrieval_fr = gr.Button("Refresh")
2113
- data_run_retrieval_fr.click(
2114
- partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_FR),
2115
- outputs=data_retrieval_fr,
2116
- )
2117
- with gr.TabItem("Polish"):
2118
- with gr.Row():
2119
- gr.Markdown("""
2120
- **Retrieval Polish Leaderboard** 🔎🇵🇱
2121
-
2122
- - **Metric:** Normalized Discounted Cumulative Gain @ k (ndcg_at_10)
2123
- - **Languages:** Polish
2124
- - **Credits:** [Konrad Wojtasik](https://github.com/kwojtasi) & [BEIR-PL](https://arxiv.org/abs/2305.19840)
2125
- """)
2126
- with gr.Row():
2127
- data_retrieval_pl = gr.components.Dataframe(
2128
- DATA_RETRIEVAL_PL,
2129
- # Add support for more columns than existing as a buffer for CQADupstack & other Retrieval tasks (e.g. MSMARCOv2)
2130
- datatype=["number", "markdown"] + ["number"] * len(DATA_RETRIEVAL_PL.columns) * 2,
2131
- type="pandas",
2132
- )
2133
- with gr.Row():
2134
- data_run_retrieval_pl = gr.Button("Refresh")
2135
- data_run_retrieval_pl.click(
2136
- partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_PL),
2137
- outputs=data_retrieval_pl,
2138
- )
2139
- with gr.TabItem("STS"):
2140
- with gr.TabItem("English"):
2141
- with gr.Row():
2142
- gr.Markdown("""
2143
- **STS English Leaderboard** 🤖
2144
-
2145
- - **Metric:** Spearman correlation based on cosine similarity
2146
- - **Languages:** English
2147
- """)
2148
- with gr.Row():
2149
- data_sts_en = gr.components.Dataframe(
2150
- DATA_STS_EN,
2151
- datatype=["number", "markdown"] + ["number"] * len(DATA_STS_EN.columns),
2152
- type="pandas",
2153
- )
2154
- with gr.Row():
2155
- data_run_sts_en = gr.Button("Refresh")
2156
- data_run_sts_en.click(
2157
- partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS),
2158
- outputs=data_sts_en,
2159
- )
2160
- with gr.TabItem("Chinese"):
2161
- with gr.Row():
2162
- gr.Markdown("""
2163
- **STS Chinese Leaderboard** 🤖🇨🇳
2164
-
2165
- - **Metric:** Spearman correlation based on cosine similarity
2166
- - **Languages:** Chinese
2167
- - **Credits:** [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)
2168
- """)
2169
- with gr.Row():
2170
- data_sts_zh = gr.components.Dataframe(
2171
- DATA_STS_ZH,
2172
- datatype=["number", "markdown"] + ["number"] * len(DATA_STS_ZH.columns),
2173
- type="pandas",
2174
- )
2175
- with gr.Row():
2176
- data_run_sts_zh = gr.Button("Refresh")
2177
- data_run_sts_zh.click(
2178
- partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_ZH),
2179
- outputs=data_sts_zh,
2180
- )
2181
- with gr.TabItem("French"):
2182
- with gr.Row():
2183
- gr.Markdown("""
2184
- **STS French Leaderboard** 🤖🇫🇷
2185
-
2186
- - **Metric:** Spearman correlation based on cosine similarity
2187
- - **Languages:** French
2188
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
2189
- """)
2190
- with gr.Row():
2191
- data_sts_fr = gr.components.Dataframe(
2192
- DATA_STS_FR,
2193
- datatype=["number", "markdown"] + ["number"] * len(DATA_STS_FR.columns),
2194
- type="pandas",
2195
- )
2196
- with gr.Row():
2197
- data_run_sts_fr = gr.Button("Refresh")
2198
- data_run_sts_fr.click(
2199
- partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_FR),
2200
- outputs=data_sts_fr,
2201
- )
2202
- with gr.TabItem("Polish"):
2203
- with gr.Row():
2204
- gr.Markdown("""
2205
- **STS Polish Leaderboard** 🤖🇵🇱
2206
-
2207
- - **Metric:** Spearman correlation based on cosine similarity
2208
- - **Languages:** Polish
2209
- - **Credits:** [Rafał Poświata](https://github.com/rafalposwiata)
2210
- """)
2211
- with gr.Row():
2212
- data_sts_pl = gr.components.Dataframe(
2213
- DATA_STS_PL,
2214
- datatype=["number", "markdown"] + ["number"] * len(DATA_STS_PL.columns),
2215
- type="pandas",
2216
- )
2217
- with gr.Row():
2218
- data_run_sts_pl = gr.Button("Refresh")
2219
- data_run_sts_pl.click(
2220
- partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_PL),
2221
- outputs=data_sts_pl,
2222
- )
2223
- with gr.TabItem("Other"):
2224
- with gr.Row():
2225
- gr.Markdown("""
2226
- **STS Other Leaderboard** 👽
2227
-
2228
- - **Metric:** Spearman correlation based on cosine similarity
2229
- - **Languages:** Arabic, Chinese, Dutch, English, French, German, Italian, Korean, Polish, Russian, Spanish (Only language combos not included in the other tabs)
2230
- """)
2231
- with gr.Row():
2232
- data_sts_other = gr.components.Dataframe(
2233
- DATA_STS_OTHER,
2234
- datatype=["number", "markdown"] + ["number"] * len(DATA_STS_OTHER.columns) * 2,
2235
- type="pandas",
2236
- )
2237
- with gr.Row():
2238
- data_run_sts_other = gr.Button("Refresh")
2239
- data_run_sts_other.click(
2240
- partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_OTHER),
2241
- outputs=data_sts_other,
2242
- )
2243
- with gr.TabItem("Summarization"):
2244
- with gr.TabItem("English"):
2245
- with gr.Row():
2246
- gr.Markdown("""
2247
- **Summarization Leaderboard** 📜
2248
-
2249
- - **Metric:** Spearman correlation based on cosine similarity
2250
- - **Languages:** English
2251
- """)
2252
- with gr.Row():
2253
- data_summarization = gr.components.Dataframe(
2254
- DATA_SUMMARIZATION,
2255
- datatype=["number", "markdown"] + ["number"] * 2,
2256
- type="pandas",
2257
- )
2258
- with gr.Row():
2259
- data_run = gr.Button("Refresh")
2260
- data_run.click(
2261
- partial(get_mteb_data, tasks=TASK_LIST_SUMMARIZATION),
2262
- outputs=data_summarization,
2263
- )
2264
- with gr.TabItem("French"):
2265
- with gr.Row():
2266
- gr.Markdown("""
2267
- **Summarization Leaderboard** 📜
2268
-
2269
- - **Metric:** Spearman correlation based on cosine similarity
2270
- - **Languages:** French
2271
- - **Credits:** [Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [wissam-sib](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)
2272
- """)
2273
- with gr.Row():
2274
- data_summarization_fr = gr.components.Dataframe(
2275
- DATA_SUMMARIZATION_FR,
2276
- datatype=["number", "markdown"] + ["number"] * 2,
2277
- type="pandas",
2278
- )
2279
- with gr.Row():
2280
- data_run_summarization_fr = gr.Button("Refresh")
2281
- data_run_summarization_fr.click(
2282
- partial(get_mteb_data, tasks=TASK_LIST_SUMMARIZATION_FR),
2283
- outputs=data_run_summarization_fr,
2284
- )
2285
  gr.Markdown(f"""
2286
  - **Total Datasets**: {NUM_DATASETS}
2287
  - **Total Languages**: 113
@@ -2302,16 +1865,10 @@ with block:
2302
  }
2303
  ```
2304
  """)
2305
- # Running the functions on page load in addition to when the button is clicked
2306
- # This is optional - If deactivated the data loaded at "Build time" is shown like for Overall tab
2307
- """
2308
- block.load(get_mteb_data, inputs=[task_bitext_mining], outputs=data_bitext_mining)
2309
- """
2310
 
2311
  block.queue(max_size=10)
2312
  block.launch()
2313
 
2314
-
2315
  # Possible changes:
2316
  # Could add graphs / other visual content
2317
  # Could add verification marks
 
23
  ]
24
 
25
  TASK_LIST_BITEXT_MINING = ['BUCC (de-en)', 'BUCC (fr-en)', 'BUCC (ru-en)', 'BUCC (zh-en)', 'Tatoeba (afr-eng)', 'Tatoeba (amh-eng)', 'Tatoeba (ang-eng)', 'Tatoeba (ara-eng)', 'Tatoeba (arq-eng)', 'Tatoeba (arz-eng)', 'Tatoeba (ast-eng)', 'Tatoeba (awa-eng)', 'Tatoeba (aze-eng)', 'Tatoeba (bel-eng)', 'Tatoeba (ben-eng)', 'Tatoeba (ber-eng)', 'Tatoeba (bos-eng)', 'Tatoeba (bre-eng)', 'Tatoeba (bul-eng)', 'Tatoeba (cat-eng)', 'Tatoeba (cbk-eng)', 'Tatoeba (ceb-eng)', 'Tatoeba (ces-eng)', 'Tatoeba (cha-eng)', 'Tatoeba (cmn-eng)', 'Tatoeba (cor-eng)', 'Tatoeba (csb-eng)', 'Tatoeba (cym-eng)', 'Tatoeba (dan-eng)', 'Tatoeba (deu-eng)', 'Tatoeba (dsb-eng)', 'Tatoeba (dtp-eng)', 'Tatoeba (ell-eng)', 'Tatoeba (epo-eng)', 'Tatoeba (est-eng)', 'Tatoeba (eus-eng)', 'Tatoeba (fao-eng)', 'Tatoeba (fin-eng)', 'Tatoeba (fra-eng)', 'Tatoeba (fry-eng)', 'Tatoeba (gla-eng)', 'Tatoeba (gle-eng)', 'Tatoeba (glg-eng)', 'Tatoeba (gsw-eng)', 'Tatoeba (heb-eng)', 'Tatoeba (hin-eng)', 'Tatoeba (hrv-eng)', 'Tatoeba (hsb-eng)', 'Tatoeba (hun-eng)', 'Tatoeba (hye-eng)', 'Tatoeba (ido-eng)', 'Tatoeba (ile-eng)', 'Tatoeba (ina-eng)', 'Tatoeba (ind-eng)', 'Tatoeba (isl-eng)', 'Tatoeba (ita-eng)', 'Tatoeba (jav-eng)', 'Tatoeba (jpn-eng)', 'Tatoeba (kab-eng)', 'Tatoeba (kat-eng)', 'Tatoeba (kaz-eng)', 'Tatoeba (khm-eng)', 'Tatoeba (kor-eng)', 'Tatoeba (kur-eng)', 'Tatoeba (kzj-eng)', 'Tatoeba (lat-eng)', 'Tatoeba (lfn-eng)', 'Tatoeba (lit-eng)', 'Tatoeba (lvs-eng)', 'Tatoeba (mal-eng)', 'Tatoeba (mar-eng)', 'Tatoeba (max-eng)', 'Tatoeba (mhr-eng)', 'Tatoeba (mkd-eng)', 'Tatoeba (mon-eng)', 'Tatoeba (nds-eng)', 'Tatoeba (nld-eng)', 'Tatoeba (nno-eng)', 'Tatoeba (nob-eng)', 'Tatoeba (nov-eng)', 'Tatoeba (oci-eng)', 'Tatoeba (orv-eng)', 'Tatoeba (pam-eng)', 'Tatoeba (pes-eng)', 'Tatoeba (pms-eng)', 'Tatoeba (pol-eng)', 'Tatoeba (por-eng)', 'Tatoeba (ron-eng)', 'Tatoeba (rus-eng)', 'Tatoeba (slk-eng)', 'Tatoeba (slv-eng)', 'Tatoeba (spa-eng)', 'Tatoeba (sqi-eng)', 'Tatoeba (srp-eng)', 'Tatoeba (swe-eng)', 'Tatoeba (swg-eng)', 'Tatoeba (swh-eng)', 'Tatoeba (tam-eng)', 'Tatoeba (tat-eng)', 'Tatoeba (tel-eng)', 'Tatoeba (tgl-eng)', 'Tatoeba (tha-eng)', 'Tatoeba (tuk-eng)', 'Tatoeba (tur-eng)', 'Tatoeba (tzl-eng)', 'Tatoeba (uig-eng)', 'Tatoeba (ukr-eng)', 'Tatoeba (urd-eng)', 'Tatoeba (uzb-eng)', 'Tatoeba (vie-eng)', 'Tatoeba (war-eng)', 'Tatoeba (wuu-eng)', 'Tatoeba (xho-eng)', 'Tatoeba (yid-eng)', 'Tatoeba (yue-eng)', 'Tatoeba (zsm-eng)']
26
+ TASK_LIST_BITEXT_MINING_DA = ["BornholmBitextMining"]
27
 
28
  TASK_LIST_CLASSIFICATION = [
29
  "AmazonCounterfactualClassification (en)",
 
1027
  examples["mteb_task"] = "STS"
1028
  elif examples["mteb_dataset_name"] in norm(TASK_LIST_SUMMARIZATION + TASK_LIST_SUMMARIZATION_FR):
1029
  examples["mteb_task"] = "Summarization"
1030
+ elif examples["mteb_dataset_name"] in norm(TASK_LIST_BITEXT_MINING + TASK_LIST_BITEXT_MINING_DA):
1031
  examples["mteb_task"] = "BitextMining"
1032
  else:
1033
  print("WARNING: Task not found for dataset", examples["mteb_dataset_name"])
 
1427
  get_mteb_average_pl()
1428
  get_mteb_average_zh()
1429
  DATA_BITEXT_MINING = get_mteb_data(["BitextMining"], [], TASK_LIST_BITEXT_MINING)
1430
+ DATA_BITEXT_MINING_DA = get_mteb_data(["BitextMining"], [], TASK_LIST_BITEXT_MINING_DA)
1431
  DATA_CLASSIFICATION_DA = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_DA)
1432
  DATA_CLASSIFICATION_NB = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_NB)
1433
  DATA_CLASSIFICATION_SV = get_mteb_data(["Classification"], [], TASK_LIST_CLASSIFICATION_SV)
 
1442
  # LANGUAGES = []
1443
  for d in [
1444
  DATA_BITEXT_MINING,
1445
+ DATA_BITEXT_MINING_DA,
1446
  DATA_CLASSIFICATION_EN,
1447
  DATA_CLASSIFICATION_DA,
1448
  DATA_CLASSIFICATION_FR,
 
1505
  }
1506
  """
1507
 
1508
+ """
1509
+ Each inner tab can have the following keys:
1510
+ - language: The language of the leaderboard
1511
+ - language_long: [optional] The long form of the language
1512
+ - description: The description of the leaderboard
1513
+ - credits: [optional] The credits for the leaderboard
1514
+ - data: The data for the leaderboard
1515
+ - refresh: The function to refresh the leaderboard
1516
+ """
1517
+
1518
+ chinese_credits = "[FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding)"
1519
+ french_credits = "[Lyon-NLP](https://github.com/Lyon-NLP): [Gabriel Sequeira](https://github.com/GabrielSequeira), [Imene Kerboua](https://github.com/imenelydiaker), [Wissam Siblini](https://github.com/wissam-sib), [Mathieu Ciancone](https://github.com/MathieuCiancone), [Marion Schaeffer](https://github.com/schmarion)"
1520
+ danish_credits = "[Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)"
1521
+ norwegian_credits = "[Kenneth Enevoldsen](https://github.com/KennethEnevoldsen), [scandinavian-embedding-benchmark](https://kennethenevoldsen.github.io/scandinavian-embedding-benchmark/)"
1522
+ polish_credits = "[Rafał Poświata](https://github.com/rafalposwiata)"
1523
+
1524
+ data = {
1525
+ "Overall": {
1526
+ "metric": "Various, refer to task tabs",
1527
+ "data": [
1528
+ {
1529
+ "language": "English",
1530
+ "description": "**Overall MTEB English leaderboard** 🔮",
1531
+ "data": DATA_OVERALL,
1532
+ "refresh": get_mteb_average,
1533
+ },
1534
+ {
1535
+ "language": "Chinese",
1536
+ "data": DATA_OVERALL_ZH,
1537
+ "description": "**Overall MTEB Chinese leaderboard (C-MTEB)** 🔮🇨🇳",
1538
+ "credits": chinese_credits,
1539
+ "refresh": get_mteb_average_zh,
1540
+ },
1541
+ {
1542
+ "language": "French",
1543
+ "data": DATA_OVERALL_FR,
1544
+ "description": "**Overall MTEB French leaderboard (F-MTEB)** 🔮🇫🇷",
1545
+ "credits": french_credits,
1546
+ "refresh": get_mteb_average_fr,
1547
+ },
1548
+ {
1549
+ "language": "Polish",
1550
+ "data": DATA_OVERALL_PL,
1551
+ "description": "**Overall MTEB Polish leaderboard** 🔮🇵🇱",
1552
+ "refresh": get_mteb_average_pl,
1553
+ },
1554
+ ]
1555
+ },
1556
+ "Bitext Mining": {
1557
+ "metric": "[F1](https://huggingface.co/spaces/evaluate-metric/f1)",
1558
+ "data": [
1559
+ {
1560
+ "language": "English-X",
1561
+ "language_long": "117 (Pairs of: English & other language)",
1562
+ "description": "**Bitext Mining English-X Leaderboard** 🎌",
1563
+ "data": DATA_BITEXT_MINING,
1564
+ "refresh": partial(get_mteb_data, tasks=["BitextMining"], datasets=TASK_LIST_BITEXT_MINING),
1565
+ },
1566
+ {
1567
+ "language": "Danish",
1568
+ "language_long": "Danish & Bornholmsk (Danish Dialect)",
1569
+ "description": "**Bitext Mining Danish Leaderboard** 🎌🇩🇰",
1570
+ "credits": danish_credits,
1571
+ "data": DATA_BITEXT_MINING_DA,
1572
+ "refresh": partial(get_mteb_data, tasks=["BitextMining"], datasets=TASK_LIST_BITEXT_MINING_DA),
1573
+ }
1574
+ ]
1575
+ },
1576
+ "Classification": {
1577
+ "metric": "[Accuracy](https://huggingface.co/spaces/evaluate-metric/accuracy)",
1578
+ "data": [
1579
+ {
1580
+ "language": "English",
1581
+ "description": "**Classification English Leaderboard** ❤️",
1582
+ "data": DATA_CLASSIFICATION_EN,
1583
+ "refresh": partial(get_mteb_data, tasks=["Classification"], langs=["en"])
1584
+ },
1585
+ {
1586
+ "language": "Chinese",
1587
+ "description": "**Classification Chinese Leaderboard** 🧡🇨🇳",
1588
+ "credits": chinese_credits,
1589
+ "data": DATA_CLASSIFICATION_ZH,
1590
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_ZH)
1591
+ },
1592
+ {
1593
+ "language": "Danish",
1594
+ "description": "**Classification Danish Leaderboard** 🤍🇩🇰",
1595
+ "credits": danish_credits,
1596
+ "data": DATA_CLASSIFICATION_DA,
1597
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_DA)
1598
+ },
1599
+ {
1600
+ "language": "French",
1601
+ "description": "**Classification French Leaderboard** 💙🇫🇷",
1602
+ "credits": french_credits,
1603
+ "data": DATA_CLASSIFICATION_FR,
1604
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_FR)
1605
+ },
1606
+ {
1607
+ "language": "Norwegian",
1608
+ "language_long": "Norwegian Bokmål",
1609
+ "description": "**Classification Norwegian Leaderboard** 💙🇳🇴",
1610
+ "credits": norwegian_credits,
1611
+ "data": DATA_CLASSIFICATION_NB,
1612
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_NB)
1613
+ },
1614
+ {
1615
+ "language": "Polish",
1616
+ "description": "**Classification Polish Leaderboard** 🤍🇵🇱",
1617
+ "credits": polish_credits,
1618
+ "data": DATA_CLASSIFICATION_PL,
1619
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_PL)
1620
+ },
1621
+ {
1622
+ "language": "Swedish",
1623
+ "description": "**Classification Swedish Leaderboard** 💛🇸🇪",
1624
+ "credits": norwegian_credits,
1625
+ "data": DATA_CLASSIFICATION_SV,
1626
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_SV)
1627
+ },
1628
+ {
1629
+ "language": "Other",
1630
+ "language_long": "47 (Only languages not included in the other tabs)",
1631
+ "description": "**Classification Other Languages Leaderboard** 💜💚💙",
1632
+ "data": DATA_CLASSIFICATION_OTHER,
1633
+ "refresh": partial(get_mteb_data, tasks=["Classification"], datasets=TASK_LIST_CLASSIFICATION_OTHER)
1634
+ }
1635
+ ]
1636
+ },
1637
+ "Clustering": {
1638
+ "metric": "Validity Measure (v_measure)",
1639
+ "data": [
1640
+ {
1641
+ "language": "English",
1642
+ "description": "**Clustering Leaderboard** ✨",
1643
+ "data": DATA_CLUSTERING,
1644
+ "refresh": partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING)
1645
+ },
1646
+ {
1647
+ "language": "Chinese",
1648
+ "description": "**Clustering Chinese Leaderboard** ✨🇨🇳",
1649
+ "credits": chinese_credits,
1650
+ "data": DATA_CLUSTERING_ZH,
1651
+ "refresh": partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_ZH)
1652
+ },
1653
+ {
1654
+ "language": "French",
1655
+ "description": "**Clustering French Leaderboard** ✨🇫🇷",
1656
+ "credits": french_credits,
1657
+ "data": DATA_CLUSTERING_FR,
1658
+ "refresh": partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_FR)
1659
+ },
1660
+ {
1661
+ "language": "German",
1662
+ "description": "**Clustering German Leaderboard** ✨🇩🇪",
1663
+ "credits": "[Silvan](https://github.com/slvnwhrl)",
1664
+ "data": DATA_CLUSTERING_DE,
1665
+ "refresh": partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_DE)
1666
+ },
1667
+ {
1668
+ "language": "Polish",
1669
+ "description": "**Clustering Polish Leaderboard** ✨🇵🇱",
1670
+ "credits": polish_credits,
1671
+ "data": DATA_CLUSTERING_PL,
1672
+ "refresh": partial(get_mteb_data, tasks=["Clustering"], datasets=TASK_LIST_CLUSTERING_PL)
1673
+ },
1674
+ ]
1675
+ },
1676
+ "Pair Classification": {
1677
+ "metric": "Average Precision based on Cosine Similarities (cos_sim_ap)",
1678
+ "data": [
1679
+ {
1680
+ "language": "English",
1681
+ "description": "**Pair Classification English Leaderboard** 🎭",
1682
+ "data": DATA_PAIR_CLASSIFICATION,
1683
+ "refresh": partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION)
1684
+ },
1685
+ {
1686
+ "language": "Chinese",
1687
+ "description": "**Pair Classification Chinese Leaderboard** 🎭🇨🇳",
1688
+ "credits": chinese_credits,
1689
+ "data": DATA_PAIR_CLASSIFICATION_ZH,
1690
+ "refresh": partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_ZH)
1691
+ },
1692
+ {
1693
+ "language": "French",
1694
+ "description": "**Pair Classification French Leaderboard** 🎭🇫🇷",
1695
+ "credits": french_credits,
1696
+ "data": DATA_PAIR_CLASSIFICATION_FR,
1697
+ "refresh": partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_FR)
1698
+ },
1699
+ {
1700
+ "language": "Polish",
1701
+ "description": "**Pair Classification Polish Leaderboard** 🎭🇵🇱",
1702
+ "credits": polish_credits,
1703
+ "data": DATA_PAIR_CLASSIFICATION_PL,
1704
+ "refresh": partial(get_mteb_data, tasks=["PairClassification"], datasets=TASK_LIST_PAIR_CLASSIFICATION_PL)
1705
+ },
1706
+ ]
1707
+ },
1708
+ "Reranking": {
1709
+ "metric": "Mean Average Precision (MAP)",
1710
+ "data": [
1711
+ {
1712
+ "language": "English",
1713
+ "description": "**Reranking English Leaderboard** 🥈",
1714
+ "data": DATA_RERANKING,
1715
+ "refresh": partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING)
1716
+ },
1717
+ {
1718
+ "language": "Chinese",
1719
+ "description": "**Reranking Chinese Leaderboard** 🥈🇨🇳",
1720
+ "credits": chinese_credits,
1721
+ "data": DATA_RERANKING_ZH,
1722
+ "refresh": partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING_ZH)
1723
+ },
1724
+ {
1725
+ "language": "French",
1726
+ "description": "**Reranking French Leaderboard** 🥈🇫🇷",
1727
+ "credits": french_credits,
1728
+ "data": DATA_RERANKING_FR,
1729
+ "refresh": partial(get_mteb_data, tasks=["Reranking"], datasets=TASK_LIST_RERANKING_FR)
1730
+ }
1731
+ ]
1732
+ },
1733
+ "Retrieval": {
1734
+ "metric": "Normalized Discounted Cumulative Gain @ k (ndcg_at_10)",
1735
+ "data": [
1736
+ {
1737
+ "language": "English",
1738
+ "description": "**Retrieval English Leaderboard** 🔎",
1739
+ "data": DATA_RETRIEVAL,
1740
+ "refresh": partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL)
1741
+ },
1742
+ {
1743
+ "language": "Chinese",
1744
+ "description": "**Retrieval Chinese Leaderboard** 🔎🇨🇳",
1745
+ "credits": chinese_credits,
1746
+ "data": DATA_RETRIEVAL_ZH,
1747
+ "refresh": partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_ZH)
1748
+ },
1749
+ {
1750
+ "language": "French",
1751
+ "description": "**Retrieval French Leaderboard** 🔎🇫🇷",
1752
+ "credits": french_credits,
1753
+ "data": DATA_RETRIEVAL_FR,
1754
+ "refresh": partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_FR)
1755
+ },
1756
+ {
1757
+ "language": "Polish",
1758
+ "description": "**Retrieval Polish Leaderboard** 🔎🇵🇱",
1759
+ "credits": polish_credits,
1760
+ "data": DATA_RETRIEVAL_PL,
1761
+ "refresh": partial(get_mteb_data, tasks=["Retrieval"], datasets=TASK_LIST_RETRIEVAL_PL)
1762
+ }
1763
+ ]
1764
+ },
1765
+ "STS": {
1766
+ "metric": "Spearman correlation based on cosine similarity",
1767
+ "data": [
1768
+ {
1769
+ "language": "English",
1770
+ "description": "**STS English Leaderboard** 🤖",
1771
+ "data": DATA_STS_EN,
1772
+ "refresh": partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS)
1773
+ },
1774
+ {
1775
+ "language": "Chinese",
1776
+ "description": "**STS Chinese Leaderboard** 🤖🇨🇳",
1777
+ "credits": chinese_credits,
1778
+ "data": DATA_STS_ZH,
1779
+ "refresh": partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_ZH)
1780
+ },
1781
+ {
1782
+ "language": "French",
1783
+ "description": "**STS French Leaderboard** 🤖🇫🇷",
1784
+ "credits": french_credits,
1785
+ "data": DATA_STS_FR,
1786
+ "refresh": partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_FR)
1787
+ },
1788
+ {
1789
+ "language": "Polish",
1790
+ "description": "**STS Polish Leaderboard** 🤖🇵🇱",
1791
+ "credits": polish_credits,
1792
+ "data": DATA_STS_PL,
1793
+ "refresh": partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_PL)
1794
+ },
1795
+ {
1796
+ "language": "Other",
1797
+ "language_long": "Arabic, Chinese, Dutch, English, French, German, Italian, Korean, Polish, Russian, Spanish (Only language combos not included in the other tabs)",
1798
+ "description": "**STS Other Leaderboard** 👽",
1799
+ "data": DATA_STS_OTHER,
1800
+ "refresh": partial(get_mteb_data, tasks=["STS"], datasets=TASK_LIST_STS_OTHER)
1801
+ },
1802
+ ]
1803
+ },
1804
+ "Summarization": {
1805
+ "metric": "Spearman correlation based on cosine similarity",
1806
+ "data": [
1807
+ {
1808
+ "language": "English",
1809
+ "description": "**Summarization Leaderboard** 📜",
1810
+ "data": DATA_SUMMARIZATION,
1811
+ "refresh": partial(get_mteb_data, tasks=TASK_LIST_SUMMARIZATION)
1812
+ },
1813
+ {
1814
+ "language": "French",
1815
+ "description": "**Summarization Leaderboard** 📜",
1816
+ "credits": french_credits,
1817
+ "data": DATA_SUMMARIZATION_FR,
1818
+ "refresh": partial(get_mteb_data, tasks=TASK_LIST_SUMMARIZATION_FR)
1819
+ }
1820
+ ]
1821
+ }
1822
+ }
1823
+ dataframes = []
1824
+
1825
+ with gr.Blocks(css=css) as block:
1826
  with gr.Tabs():
1827
+ for task, task_values in data.items():
1828
+ metric = task_values["metric"]
1829
+ with gr.Tab(task):
1830
+ for item in task_values["data"]:
1831
+ with gr.Tab(item["language"]):
1832
+ with gr.Row():
1833
+ gr.Markdown(f"""
1834
+ {item['description']}
1835
+
1836
+ - **Metric:** {metric}
1837
+ - **Languages:** {item['language_long'] if 'language_long' in item else item['language']}
1838
+ {"- **Credits:** " + item['credits'] if "credits" in item else ''}
1839
+ """)
1840
+ with gr.Row():
1841
+ datatype = ["number", "markdown"] + ["number"] * len(item["data"])
1842
+ dataframe = gr.Dataframe(item["data"], datatype=datatype, type="pandas", height=600)
1843
+ dataframes.append(dataframe)
1844
+ with gr.Row():
1845
+ refresh_button = gr.Button("Refresh")
1846
+ refresh_button.click(item["refresh"], inputs=None, outputs=dataframe)
1847
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1848
  gr.Markdown(f"""
1849
  - **Total Datasets**: {NUM_DATASETS}
1850
  - **Total Languages**: 113
 
1865
  }
1866
  ```
1867
  """)
 
 
 
 
 
1868
 
1869
  block.queue(max_size=10)
1870
  block.launch()
1871
 
 
1872
  # Possible changes:
1873
  # Could add graphs / other visual content
1874
  # Could add verification marks