Spaces:
Sleeping
Sleeping
Updated app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,9 @@ def login():
|
|
34 |
.stApp {
|
35 |
background: linear-gradient(
|
36 |
125deg,
|
37 |
-
#
|
38 |
-
#
|
39 |
-
#
|
40 |
);
|
41 |
background-size: 200% 200%;
|
42 |
animation: gradientMove 10s ease infinite;
|
@@ -426,8 +426,7 @@ else:
|
|
426 |
st.session_state.comments = []
|
427 |
|
428 |
def add_comment(comment):
|
429 |
-
|
430 |
-
st.session_state.comments.append({"name": "", "comment": sanitized_comment, "date": datetime.now().strftime("%d, %b %Y")})
|
431 |
|
432 |
if 'name' not in st.session_state:
|
433 |
st.session_state.name = ""
|
@@ -453,14 +452,14 @@ else:
|
|
453 |
comment_input = st.text_area("Your Comment", height=100, value=st.session_state.comment)
|
454 |
submit_button = st.form_submit_button("Submit")
|
455 |
st.markdown('</div>', unsafe_allow_html=True)
|
456 |
-
|
457 |
if submit_button:
|
458 |
if not comment_input:
|
459 |
st.error("Enter your comment")
|
460 |
else:
|
461 |
add_comment(comment_input)
|
462 |
-
st.session_state.comment = ""
|
463 |
-
|
464 |
|
465 |
with st.sidebar:
|
466 |
|
|
|
34 |
.stApp {
|
35 |
background: linear-gradient(
|
36 |
125deg,
|
37 |
+
#FEFFD2 0%,
|
38 |
+
#DCFFB7 50%,
|
39 |
+
#FFF8E3 100%
|
40 |
);
|
41 |
background-size: 200% 200%;
|
42 |
animation: gradientMove 10s ease infinite;
|
|
|
426 |
st.session_state.comments = []
|
427 |
|
428 |
def add_comment(comment):
|
429 |
+
st.session_state.comments.append({"name": "", "comment": comment, "date": datetime.now().strftime("%d, %b %Y")})
|
|
|
430 |
|
431 |
if 'name' not in st.session_state:
|
432 |
st.session_state.name = ""
|
|
|
452 |
comment_input = st.text_area("Your Comment", height=100, value=st.session_state.comment)
|
453 |
submit_button = st.form_submit_button("Submit")
|
454 |
st.markdown('</div>', unsafe_allow_html=True)
|
455 |
+
|
456 |
if submit_button:
|
457 |
if not comment_input:
|
458 |
st.error("Enter your comment")
|
459 |
else:
|
460 |
add_comment(comment_input)
|
461 |
+
st.session_state.comment = ""
|
462 |
+
st.rerun()
|
463 |
|
464 |
with st.sidebar:
|
465 |
|