mery22 commited on
Commit
3f54657
β€’
1 Parent(s): ab39ce5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -111,12 +111,13 @@ with st.form(key='interaction_form'):
111
  user_input = st.text_input("You:", key="user_input")
112
  ask_button = st.form_submit_button("Ask πŸ“¨") # Button to submit the question
113
 
114
- if ask_button and user_input.strip():
115
- bot_response = chatbot_response(user_input)
116
- st.markdown("### Bot:")
117
- st.text_area("", value=bot_response, height=600)
118
 
119
- # Feedback section within the same form
 
120
  st.markdown("### Rate the response:")
121
  rating = st.slider("Select a rating:", min_value=1, max_value=5, value=1, key="rating")
122
 
 
111
  user_input = st.text_input("You:", key="user_input")
112
  ask_button = st.form_submit_button("Ask πŸ“¨") # Button to submit the question
113
 
114
+ if ask_button and user_input.strip():
115
+ bot_response = chatbot_response(user_input)
116
+ st.markdown("### Bot:")
117
+ st.text_area("", value=bot_response, height=600)
118
 
119
+ # Separate form for feedback submission
120
+ with st.form(key='feedback_form'):
121
  st.markdown("### Rate the response:")
122
  rating = st.slider("Select a rating:", min_value=1, max_value=5, value=1, key="rating")
123