Spaces:
Build error
Build error
Shafeek Saleem
commited on
Commit
·
b20b93b
1
Parent(s):
b2767c5
initjj
Browse files- utils/login.py +13 -11
utils/login.py
CHANGED
|
@@ -14,17 +14,19 @@ def initialize_login():
|
|
| 14 |
password = st.text_input("Password", type="password")
|
| 15 |
|
| 16 |
if st.button("Login"):
|
| 17 |
-
authorized = authenticate(username, password)
|
| 18 |
-
if authorized["status"]:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
else:
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
else:
|
| 29 |
st.sidebar.success(f'Hello, {st.session_state["login"]["Name"]}!')
|
| 30 |
|
|
|
|
| 14 |
password = st.text_input("Password", type="password")
|
| 15 |
|
| 16 |
if st.button("Login"):
|
| 17 |
+
# authorized = authenticate(username, password)
|
| 18 |
+
# if authorized["status"]:
|
| 19 |
+
# st.session_state["login"] = authorized
|
| 20 |
+
# os.makedirs(
|
| 21 |
+
# os.path.join(".sessions", st.session_state["login"]["username"]),
|
| 22 |
+
# exist_ok=True,
|
| 23 |
+
# )
|
| 24 |
+
# st.success("Login Successful!")
|
| 25 |
+
# st.experimental_rerun()
|
| 26 |
+
# else:
|
| 27 |
+
# st.error("Invalid username or password")
|
| 28 |
+
st.success("Login Successful!")
|
| 29 |
+
st.experimental_rerun()
|
| 30 |
else:
|
| 31 |
st.sidebar.success(f'Hello, {st.session_state["login"]["Name"]}!')
|
| 32 |
|