Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -118,8 +118,7 @@ else:
|
|
118 |
user_message = st.chat_input("Type your message here:")
|
119 |
|
120 |
# Display the initial message from the bot
|
121 |
-
|
122 |
-
st.markdown("I'm your Mental health Assistant, How may I help you?")
|
123 |
|
124 |
## Applying the user input box
|
125 |
with input_container:
|
@@ -174,6 +173,9 @@ with input_container:
|
|
174 |
|
175 |
# Display the AI's response
|
176 |
with st.chat_message("ai"):
|
|
|
|
|
|
|
177 |
st.markdown(response)
|
178 |
st.session_state.user_sentiment = user_sentiment
|
179 |
st.session_state.mood_trend = mood_trend
|
|
|
118 |
user_message = st.chat_input("Type your message here:")
|
119 |
|
120 |
# Display the initial message from the bot
|
121 |
+
initial_message_displayed = False
|
|
|
122 |
|
123 |
## Applying the user input box
|
124 |
with input_container:
|
|
|
173 |
|
174 |
# Display the AI's response
|
175 |
with st.chat_message("ai"):
|
176 |
+
if not initial_message_displayed:
|
177 |
+
st.markdown("I'm your Mental health Assistant, How may I help you?")
|
178 |
+
initial_message_displayed = True
|
179 |
st.markdown(response)
|
180 |
st.session_state.user_sentiment = user_sentiment
|
181 |
st.session_state.mood_trend = mood_trend
|