Spaces:
Sleeping
Sleeping
Update app.py
#6
by
CosmoAI
- opened
app.py
CHANGED
@@ -27,9 +27,9 @@ def login():
|
|
27 |
usrname = st.text_input("Username")
|
28 |
password = st.text_input("Password", type="password")
|
29 |
if st.button("Login", key="loginkey"):
|
30 |
-
document = col.find_one({"
|
31 |
if document:
|
32 |
-
if password == document["
|
33 |
st.session_state.user = usrname
|
34 |
st.experimental_rerun()
|
35 |
else:
|
@@ -38,7 +38,7 @@ def login():
|
|
38 |
st.session_state.user = usrname
|
39 |
st.experimental_rerun()
|
40 |
else:
|
41 |
-
st.error("Incorrect
|
42 |
|
43 |
|
44 |
def signup():
|
|
|
27 |
usrname = st.text_input("Username")
|
28 |
password = st.text_input("Password", type="password")
|
29 |
if st.button("Login", key="loginkey"):
|
30 |
+
document = col.find_one({"username": usrname})
|
31 |
if document:
|
32 |
+
if password == document["password"]:
|
33 |
st.session_state.user = usrname
|
34 |
st.experimental_rerun()
|
35 |
else:
|
|
|
38 |
st.session_state.user = usrname
|
39 |
st.experimental_rerun()
|
40 |
else:
|
41 |
+
st.error("Incorrect Username")
|
42 |
|
43 |
|
44 |
def signup():
|