Spaces:
Running
Running
File size: 2,592 Bytes
cf9f618 221dfe3 9361457 cf9f618 a2ee676 cf9f618 d9ed521 cf9f618 e6cac5c 3eda6d3 cf9f618 5b01054 e6cac5c 7f5709e cf9f618 e6cac5c 3b3aaa9 9361457 3b3aaa9 9361457 3b3aaa9 9361457 |
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 |
import streamlit as st
# if "logged_in" not in st.session_state:
# st.session_state.logged_in = False
# def login():
# if st.button("Log in"):
# st.session_state.logged_in = True
# st.rerun()
# def logout():
# if st.button("Log out"):
# st.session_state.logged_in = False
# st.rerun()
# login_page = st.Page(login, title="Log in", icon=":material/login:")
# logout_page = st.Page(logout, title="Log out", icon=":material/logout:")
leaderboard = st.Page(
"leaderboard.py", title="Leaderboard", icon=":material/trophy:"
)
# bugs = st.Page("models/bugs.py", title="Bug reports", icon=":material/bug_report:")
# alerts = st.Page(
# "models/alerts.py", title="System alerts", icon=":material/notification_important:"
# )
search = st.Page("tools/search.py", title="Search", icon=":material/search:")
history = st.Page("tools/history.py", title="History", icon=":material/history:")
ptable = st.Page("tools/ptable.py", title="Periodic table", icon=":material/gradient:")
diatomics = st.Page("tasks/homonuclear-diatomics.py", title="Homonuclear diatomics", icon=":material/target:", default=True)
stability = st.Page("tasks/stability.py", title="High pressure stability", icon=":material/target:")
combustion = st.Page("tasks/combustion.py", title="Combustion", icon=":material/target:")
# if st.session_state.logged_in:
pg = st.navigation(
{
# "Account": [logout_page],
"": [leaderboard],
"Fundamentals": [diatomics],
"Molecular Dynamics": [stability, combustion],
# "Tools": [ptable],
}
)
# else:
# pg = st.navigation([login_page])
if pg in [stability, combustion]:
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="🍞")
pg.run()
|