Update app.py
Browse files
app.py
CHANGED
|
@@ -376,28 +376,23 @@ def authenticate_user_ui():
|
|
| 376 |
main()
|
| 377 |
else:
|
| 378 |
st.error("Authentication failed. Please check your email and password.")
|
| 379 |
-
|
| 380 |
elif tabs == "Sign-Up":
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
email
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
st.error("Passwords do not match.")
|
| 395 |
else:
|
| 396 |
-
|
| 397 |
-
if success:
|
| 398 |
-
st.success(f"User with UID: {uid} created successfully! You can now log in.")
|
| 399 |
-
else:
|
| 400 |
-
st.error("User creation failed. Please try again.")
|
| 401 |
|
| 402 |
# Log out user
|
| 403 |
def logout():
|
|
|
|
| 376 |
main()
|
| 377 |
else:
|
| 378 |
st.error("Authentication failed. Please check your email and password.")
|
| 379 |
+
|
| 380 |
elif tabs == "Sign-Up":
|
| 381 |
+
email = st.text_input("Enter Email", help="Enter your email address")
|
| 382 |
+
password = st.text_input("Enter Password", type="password", help="Enter your password")
|
| 383 |
+
confirm_password = st.text_input("Confirm Password", type="password", help="Re-enter your password for confirmation")
|
| 384 |
+
|
| 385 |
+
if st.button("Sign-Up"):
|
| 386 |
+
if not email or not password or not confirm_password:
|
| 387 |
+
st.error("Please fill all the fields.")
|
| 388 |
+
elif password != confirm_password:
|
| 389 |
+
st.error("Passwords do not match.")
|
| 390 |
+
else:
|
| 391 |
+
success, uid = create_user(email, password)
|
| 392 |
+
if success:
|
| 393 |
+
st.success(f"User with UID: {uid} created successfully! You can now log in.")
|
|
|
|
| 394 |
else:
|
| 395 |
+
st.error("User creation failed. Please try again.")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 396 |
|
| 397 |
# Log out user
|
| 398 |
def logout():
|