Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -127,4 +127,30 @@ st.markdown("""
|
|
127 |
|
128 |
# Center and color text
|
129 |
st.markdown('<h3 class="centered-text">🤖 AlteriaChat 🤖 </h3>', unsafe_allow_html=True)
|
130 |
-
st.markdown('<p class="centered-orange-text">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
# Center and color text
|
129 |
st.markdown('<h3 class="centered-text">🤖 AlteriaChat 🤖 </h3>', unsafe_allow_html=True)
|
130 |
+
st.markdown('<p class="centered-orange-text">"Votre Réponse à Chaque Défi Méthodologique "</p>', unsafe_allow_html=True)
|
131 |
+
|
132 |
+
# Input and button for user interaction
|
133 |
+
st.session_state.user_input = st.text_input("You:", st.session_state.user_input)
|
134 |
+
|
135 |
+
if st.button("Ask 📨"):
|
136 |
+
if st.session_state.user_input.strip() != "":
|
137 |
+
st.session_state.bot_response = chatbot_response(st.session_state.user_input)
|
138 |
+
|
139 |
+
if st.session_state.bot_response:
|
140 |
+
st.markdown("### Bot:")
|
141 |
+
st.text_area("", value=st.session_state.bot_response, height=600)
|
142 |
+
|
143 |
+
# Feedback Section
|
144 |
+
st.markdown("### Évaluation de la réponse")
|
145 |
+
st.session_state.rating = st.slider("Rating (1 to 5)", 1, 5, st.session_state.rating)
|
146 |
+
st.session_state.comment = st.text_area("Your comment:", st.session_state.comment)
|
147 |
+
|
148 |
+
if st.button("Submit Feedback"):
|
149 |
+
if st.session_state.comment.strip() != "":
|
150 |
+
save_feedback(st.session_state.user_input, st.session_state.bot_response, st.session_state.rating, st.session_state.comment)
|
151 |
+
else:
|
152 |
+
st.warning("⚠️ Please enter a comment.")
|
153 |
+
|
154 |
+
# Motivational quote at the bottom
|
155 |
+
st.markdown("---")
|
156 |
+
st.markdown("La collaboration est la clé du succès. Chaque question trouve sa réponse, chaque défi devient une opportunité.")
|