Skip to content

Commit

Permalink
change app.py location
Browse files Browse the repository at this point in the history
  • Loading branch information
chiang-yuan committed Jul 1, 2024
1 parent b881f30 commit cf9f618
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: MLIP Arena
emoji:
sdk: streamlit
sdk_version: 1.36.0 # The latest supported version
app_file: serve/app.py
app_file: app.py
---

# mlip-arena
Expand Down
52 changes: 52 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import streamlit as st

st.set_page_config(
layout="wide",
page_title="MLIP Arena",
page_icon=":shark:",
# initial_sidebar_state="expanded",
menu_items=None
)

# 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:")

dashboard = st.Page(
"serve/reports/dashboard.py", title="Dashboard", icon=":material/dashboard:", default=True
)
bugs = st.Page("serve/reports/bugs.py", title="Bug reports", icon=":material/bug_report:")
alerts = st.Page(
"serve/reports/alerts.py", title="System alerts", icon=":material/notification_important:"
)

search = st.Page("serve/tools/search.py", title="Search", icon=":material/search:")
history = st.Page("serve/tools/history.py", title="History", icon=":material/history:")

diatomics = st.Page("serve/tasks/homonuclear-diatomics.py", title="Homonuclear diatomics", icon="")

# if st.session_state.logged_in:
pg = st.navigation(
{
# "Account": [logout_page],
"Reports": [dashboard, bugs, alerts],
"Tools": [search, history],
"Tasks": [diatomics],
}
)
# else:
# pg = st.navigation([login_page])

pg.run()

0 comments on commit cf9f618

Please sign in to comment.