-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
39 lines (29 loc) · 971 Bytes
/
main.py
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
import streamlit as st
from helpers import use_custom_css, write_footer, welcome_mat, log_out
from routes import get_routes, get_navigation
st.set_page_config(layout="wide")
if "openai_key" not in st.session_state:
st.session_state["openai_key"] = None
welcome_mat()
use_custom_css()
pg = st.navigation(get_routes(), position="hidden")
pg.run()
with st.sidebar:
st.title("Prompt Engineering for Lawyers by Ang Hou Fu")
if st.session_state["logged_in"]:
st.write("You are logged in! :tada:")
st.button("Log out", on_click=lambda: log_out())
else:
st.write("You are not logged in.")
st.page_link(
"content/pages/Home.py",
label="Please log in.",
icon=":material/login:",
)
st.page_link(
"https://buymeacoffee.com/houfu/membership",
label="**Subscribe to this site**",
icon="👉",
)
get_navigation()
write_footer()