YashB1 commited on
Commit
f943288
Β·
verified Β·
1 Parent(s): 4e3fab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
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
- if feedback == 'πŸ‘':
61
- st.success("Thank you for your positive feedback!")
62
- elif feedback == 'πŸ‘Ž':
63
- st.error("We're sorry to hear that. Please let us know how we can improve.")
 
 
 
 
 
 
 
 
 
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
+