Mavhas commited on
Commit
c47d7b3
·
verified ·
1 Parent(s): 5c671de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -3
app.py CHANGED
@@ -20,11 +20,11 @@ if 'password_entered' not in st.session_state:
20
 
21
  if not st.session_state.password_entered:
22
  password_entered = st.text_input("Enter the secret word:", type="password")
23
- correct_password = "anna" # Replace with your secret word
24
 
25
  if password_entered == correct_password:
26
  st.session_state.password_entered = True
27
- st.experimental_rerun()
28
 
29
  if st.session_state.password_entered:
30
  st.title("Happy Valentine's Day, My Love! ❤️")
@@ -70,7 +70,48 @@ if st.session_state.password_entered:
70
  </div>
71
 
72
  <style>
73
- .heart { /* ... (same heart animation CSS as before) ... */ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  </style>
75
  """,
76
  unsafe_allow_html=True,
 
20
 
21
  if not st.session_state.password_entered:
22
  password_entered = st.text_input("Enter the secret word:", type="password")
23
+ correct_password = "yoursecretword" # Replace with your secret word
24
 
25
  if password_entered == correct_password:
26
  st.session_state.password_entered = True
27
+ st.rerun() # Corrected: Use st.rerun()
28
 
29
  if st.session_state.password_entered:
30
  st.title("Happy Valentine's Day, My Love! ❤️")
 
70
  </div>
71
 
72
  <style>
73
+ .heart {
74
+ position: absolute;
75
+ width: 30px;
76
+ height: 30px;
77
+ background-color: #f08080;
78
+ transform: rotate(-45deg);
79
+ animation: heartAnimation 5s linear infinite;
80
+ }
81
+
82
+ .heart::before,
83
+ .heart::after {
84
+ content: "";
85
+ position: absolute;
86
+ width: 30px;
87
+ height: 30px;
88
+ border-radius: 50%;
89
+ background-color: #f08080;
90
+ }
91
+
92
+ .heart::before {
93
+ top: -15px;
94
+ left: 0;
95
+ }
96
+
97
+ .heart::after {
98
+ top: 0;
99
+ left: 15px;
100
+ }
101
+
102
+ @keyframes heartAnimation {
103
+ 0% {
104
+ top: -50px;
105
+ opacity: 0;
106
+ }
107
+ 50% {
108
+ opacity: 1;
109
+ }
110
+ 100% {
111
+ top: 100vh;
112
+ opacity: 0;
113
+ }
114
+ }
115
  </style>
116
  """,
117
  unsafe_allow_html=True,