reshav1 CosmoAI commited on
Commit
d1a735d
·
1 Parent(s): 0c2a373

Update app.py (#6)

Browse files

- Update app.py (c850a34ca4e6cf22521e1770a678a4adc4f73a3c)


Co-authored-by: Sachin Verma <CosmoAI@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +3 -3
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({"Username": usrname})
31
  if document:
32
- if password == document["Password"]:
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 Email")
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():