app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,28 @@ from io import BytesIO
|
|
12 |
|
13 |
# Streamlit Page Config
|
14 |
st.set_page_config(page_title="Schlager ContractAi")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
st.title("Schlager ContractAi")
|
16 |
st.caption("Chat with your contract or manage meeting minutes")
|
17 |
|
|
|
12 |
|
13 |
# Streamlit Page Config
|
14 |
st.set_page_config(page_title="Schlager ContractAi")
|
15 |
+
|
16 |
+
# Authentication
|
17 |
+
AUTHORIZED_USER = "[email protected]"
|
18 |
+
AUTHORIZED_PASSWORD = "Pass.123"
|
19 |
+
|
20 |
+
if "authenticated" not in st.session_state:
|
21 |
+
st.session_state["authenticated"] = False
|
22 |
+
|
23 |
+
def login():
|
24 |
+
if st.session_state["email"] == AUTHORIZED_USER and st.session_state["password"] == AUTHORIZED_PASSWORD:
|
25 |
+
st.session_state["authenticated"] = True
|
26 |
+
else:
|
27 |
+
st.error("Invalid email or password. Please try again.")
|
28 |
+
|
29 |
+
if not st.session_state["authenticated"]:
|
30 |
+
st.title("Sign In")
|
31 |
+
st.text_input("Email", key="email")
|
32 |
+
st.text_input("Password", type="password", key="password")
|
33 |
+
st.button("Login", on_click=login)
|
34 |
+
st.stop()
|
35 |
+
|
36 |
+
# Main App
|
37 |
st.title("Schlager ContractAi")
|
38 |
st.caption("Chat with your contract or manage meeting minutes")
|
39 |
|