Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,10 +57,20 @@ def collect_feedback():
|
|
| 57 |
# Display thumbs up/down buttons for feedback
|
| 58 |
feedback = st.radio("Was this helpful?", ('π', 'π'))
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
if __name__ == "__main__":
|
| 66 |
collect_feedback()
|
|
|
|
|
|
| 57 |
# Display thumbs up/down buttons for feedback
|
| 58 |
feedback = st.radio("Was this helpful?", ('π', 'π'))
|
| 59 |
|
| 60 |
+
# Text input for comments
|
| 61 |
+
comments = st.text_area("Please provide any comments or suggestions:")
|
| 62 |
+
|
| 63 |
+
if st.button("Submit"):
|
| 64 |
+
if feedback == 'π':
|
| 65 |
+
st.success("Thank you for your positive feedback!")
|
| 66 |
+
elif feedback == 'π':
|
| 67 |
+
st.error("We're sorry to hear that. Please let us know how we can improve.")
|
| 68 |
+
|
| 69 |
+
# Do something with the feedback and comments (e.g., save to a database)
|
| 70 |
+
# For now, just print them
|
| 71 |
+
st.write("Feedback:", feedback)
|
| 72 |
+
st.write("Comments:", comments)
|
| 73 |
|
| 74 |
if __name__ == "__main__":
|
| 75 |
collect_feedback()
|
| 76 |
+
|