Update app.py
Browse files
app.py
CHANGED
|
@@ -24,25 +24,27 @@ lottie_hello = load_lottieurl("https://lottie.host/d29edbdd-af94-402e-bb4c-b314f
|
|
| 24 |
|
| 25 |
# Function to display the login form in the main area, not sidebar
|
| 26 |
def login():
|
| 27 |
-
st.
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
#
|
| 40 |
if "authenticated" not in st.session_state:
|
| 41 |
st.session_state["authenticated"] = False
|
| 42 |
|
| 43 |
if not st.session_state["authenticated"]:
|
| 44 |
login()
|
| 45 |
-
|
|
|
|
|
|
|
| 46 |
# Custom styles with the background image and updated shadow effect
|
| 47 |
st.markdown(
|
| 48 |
"""
|
|
@@ -112,7 +114,6 @@ else:
|
|
| 112 |
<p>Wishing you many wonderful years ahead, filled with love, happiness, and out-of-this-world adventures, space girl!</p>
|
| 113 |
<p>Now let me present to you the bday vid edit "20thChondiEdit"</p>
|
| 114 |
<p>I hope you like it!</p>
|
| 115 |
-
<p> PS: 2 decades that is old!!</p>
|
| 116 |
""" # You can change this text
|
| 117 |
st.markdown(f'<div class="custom-text">{custom_text}</div>', unsafe_allow_html=True)
|
| 118 |
|
|
@@ -129,11 +130,11 @@ else:
|
|
| 129 |
|
| 130 |
# Add the space-themed text after the video, with two paragraphs
|
| 131 |
space_text = """
|
| 132 |
-
<p>Hey dude that last
|
| 133 |
<p>These are some of those moments that were captured.</p>
|
| 134 |
<p>In all these moments Ik I haven't always been the ideal best friend and I am truly sorry for those.</p>
|
| 135 |
<p>You have been a great friend all this time and am sorry for all those times I couldn't reciprocate that.</p>
|
| 136 |
-
<p>Seriously though thank you for being there for me and for taking
|
| 137 |
<p>I haven't always been the bunny that you deserve but thank you for the aditi you have been.</p>
|
| 138 |
<p>So Happy Birthday! And I hope we stay like this for all your next bdays well just a lil bit more matured 🤓</p>
|
| 139 |
""" # You can change this text
|
|
@@ -149,4 +150,4 @@ else:
|
|
| 149 |
height=150,
|
| 150 |
width=150,
|
| 151 |
key=None,
|
| 152 |
-
)
|
|
|
|
| 24 |
|
| 25 |
# Function to display the login form in the main area, not sidebar
|
| 26 |
def login():
|
| 27 |
+
login_container = st.empty()
|
| 28 |
+
with login_container.container():
|
| 29 |
+
st.header("Enter Password to Continue")
|
| 30 |
+
password = st.text_input("Password", type="password", key="password_input")
|
| 31 |
+
if st.button("Submit"):
|
| 32 |
+
if password == APP_PASSWORD:
|
| 33 |
+
st.session_state["authenticated"] = True
|
| 34 |
+
login_container.empty()
|
| 35 |
+
st.success("Authentication successful!")
|
| 36 |
+
else:
|
| 37 |
+
st.error("Incorrect password")
|
| 38 |
+
|
| 39 |
+
# Main app logic
|
| 40 |
if "authenticated" not in st.session_state:
|
| 41 |
st.session_state["authenticated"] = False
|
| 42 |
|
| 43 |
if not st.session_state["authenticated"]:
|
| 44 |
login()
|
| 45 |
+
|
| 46 |
+
if st.session_state["authenticated"]:
|
| 47 |
+
# Rest of your app code here (unchanged)
|
| 48 |
# Custom styles with the background image and updated shadow effect
|
| 49 |
st.markdown(
|
| 50 |
"""
|
|
|
|
| 114 |
<p>Wishing you many wonderful years ahead, filled with love, happiness, and out-of-this-world adventures, space girl!</p>
|
| 115 |
<p>Now let me present to you the bday vid edit "20thChondiEdit"</p>
|
| 116 |
<p>I hope you like it!</p>
|
|
|
|
| 117 |
""" # You can change this text
|
| 118 |
st.markdown(f'<div class="custom-text">{custom_text}</div>', unsafe_allow_html=True)
|
| 119 |
|
|
|
|
| 130 |
|
| 131 |
# Add the space-themed text after the video, with two paragraphs
|
| 132 |
space_text = """
|
| 133 |
+
<p>Hey dude that last 1 year was damn crazy but it was filled with many moments.</p>
|
| 134 |
<p>These are some of those moments that were captured.</p>
|
| 135 |
<p>In all these moments Ik I haven't always been the ideal best friend and I am truly sorry for those.</p>
|
| 136 |
<p>You have been a great friend all this time and am sorry for all those times I couldn't reciprocate that.</p>
|
| 137 |
+
<p>Seriously though thank you for being there for me and for taking all the messed up things that I do.</p>
|
| 138 |
<p>I haven't always been the bunny that you deserve but thank you for the aditi you have been.</p>
|
| 139 |
<p>So Happy Birthday! And I hope we stay like this for all your next bdays well just a lil bit more matured 🤓</p>
|
| 140 |
""" # You can change this text
|
|
|
|
| 150 |
height=150,
|
| 151 |
width=150,
|
| 152 |
key=None,
|
| 153 |
+
)
|