mhmdabd commited on
Commit
1590d03
·
verified ·
1 Parent(s): d00f07b

Create streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +23 -0
streamlit_app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Dummy login data (for demo purposes)
4
+ USER_CREDENTIALS = {
5
+ "admin": "1234",
6
+ "user": "abcd"
7
+ }
8
+
9
+ def login_app():
10
+ st.title("🔐 Simple Login Page")
11
+
12
+ # Input fields
13
+ username = st.text_input("Username")
14
+ password = st.text_input("Password", type="password")
15
+
16
+ if st.button("Login"):
17
+ if username in USER_CREDENTIALS and USER_CREDENTIALS[username] == password:
18
+ st.success(f"✅ Welcome, {username}!")
19
+ else:
20
+ st.error("❌ Invalid username or password")
21
+
22
+ if __name__ == "__main__":
23
+ login_app()