Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
|
119 |
-
|
|
|
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 |
|