IAMTFRMZA commited on
Commit
775a297
·
verified ·
1 Parent(s): dd02bbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -9,6 +9,25 @@ from io import BytesIO
9
  from urllib.parse import quote
10
  from openai import OpenAI
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  # ------------------ App Configuration ------------------
13
  st.set_page_config(page_title="Schlaeger Forrestdale TechDocAIA", layout="wide", initial_sidebar_state="collapsed")
14
  st.title("📄 Schlaeger Forrestdale Document Assistant")
 
9
  from urllib.parse import quote
10
  from openai import OpenAI
11
 
12
+ # ------------------ Authentication ------------------
13
+ def login():
14
+ st.title("🔐 Login Required")
15
+ email = st.text_input("Email")
16
+ password = st.text_input("Password", type="password")
17
+ if st.button("Login"):
18
+ if email == "[email protected]" and password == "Pass.123":
19
+ st.session_state.authenticated = True
20
+ st.rerun()
21
+ else:
22
+ st.error("❌ Incorrect email or password.")
23
+
24
+ if "authenticated" not in st.session_state:
25
+ st.session_state.authenticated = False
26
+
27
+ if not st.session_state.authenticated:
28
+ login()
29
+ st.stop()
30
+
31
  # ------------------ App Configuration ------------------
32
  st.set_page_config(page_title="Schlaeger Forrestdale TechDocAIA", layout="wide", initial_sidebar_state="collapsed")
33
  st.title("📄 Schlaeger Forrestdale Document Assistant")