File size: 2,074 Bytes
5fe6cc0
 
9bb7c14
 
5fe6cc0
 
9bb7c14
49cde4e
5fe6cc0
9bb7c14
 
5fe6cc0
 
 
 
 
 
75ac94f
 
5fe6cc0
 
 
 
 
 
 
 
9bb7c14
081cfa7
5fe6cc0
 
1485b15
 
 
 
 
 
558b4d7
1485b15
5fe6cc0
1485b15
 
 
 
 
 
 
 
558b4d7
1485b15
5fe6cc0
1485b15
 
081cfa7
75ac94f
 
 
 
558b4d7
474b793
 
 
 
081cfa7
 
 
 
 
 
 
 
 
 
 
3246b20
558b4d7
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
70
71
72
73
74
75
76
77
from collections import defaultdict

import streamlit as st

from mlip_arena.tasks import REGISTRY as TASKS


leaderboard = st.Page(
    "leaderboard.py", title="Leaderboard", icon=":material/trophy:", default=True
)

nav = defaultdict(list)
nav[""].append(leaderboard)

wide_pages, centered_pages = [], []

for task in TASKS:
    if TASKS[task]['task-page'] is None:
        continue
    page = st.Page(
        f"tasks/{TASKS[task]['task-page']}.py", title=task, icon=":material/target:"
    )
    nav[TASKS[task]["category"]].append(page)
    if TASKS[task]["task-layout"] == "wide":
        wide_pages.append(page)
    else:
        centered_pages.append(page)

pg = st.navigation(nav, expanded=True)

if pg in centered_pages:
    st.set_page_config(
        layout="centered",
        page_title="MLIP Arena",
        page_icon=":shark:",
        initial_sidebar_state="expanded",
        menu_items={
            "About": "https://github.com/atomind-ai/mlip-arena",
            "Report a bug": "https://github.com/atomind-ai/mlip-arena/issues/new",
        },
    )
else:
    st.set_page_config(
        layout="wide",
        page_title="MLIP Arena",
        page_icon=":shark:",
        initial_sidebar_state="expanded",
        menu_items={
            "About": "https://github.com/atomind-ai/mlip-arena",
            "Report a bug": "https://github.com/atomind-ai/mlip-arena/issues/new",
        },
    )


# st.toast(
#     "MLIP Arena is currently in **pre-alpha**. The results are not stable. Please interpret them with care. Contributions are welcome. For more information, visit https://github.com/atomind-ai/mlip-arena.",
#     icon="🍞",
# )

st.sidebar.page_link(
    "https://github.com/atomind-ai/mlip-arena", label="GitHub Repository", icon=":material/code:"
)

st.sidebar.markdown(
"""
Complementary Benchmarks
"""
)
st.sidebar.page_link(
    "https://matbench-discovery.materialsproject.org/", label="Matbench Discovery", icon=":material/link:"
)
st.sidebar.page_link(
    "https://openkim.org/", label="OpenKIM", icon=":material/link:"
)

pg.run()