Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,10 +102,10 @@ if prompt := st.chat_input(f"Hi, I'm {selected_model}, ask me a question"):
|
|
102 |
|
103 |
# Check if intervention is needed based on bot response
|
104 |
if any(keyword in prompt.lower() for keyword in ["human", "therapist", "someone", "died", "death", "help", "suicide", "suffering", "crisis", "emergency", "support", "depressed", "anxiety", "lonely", "desperate", "struggling", "counseling", "distressed", "hurt", "pain", "grief", "trauma", "abuse", "danger", "risk", "urgent", "need assistance"]):
|
105 |
-
|
106 |
if not st.session_state.ask_intervention:
|
107 |
-
|
108 |
-
|
109 |
st.write("You can reach out to a certified therapist at +25493609747.")
|
110 |
|
111 |
# Interact with the selected model
|
|
|
102 |
|
103 |
# Check if intervention is needed based on bot response
|
104 |
if any(keyword in prompt.lower() for keyword in ["human", "therapist", "someone", "died", "death", "help", "suicide", "suffering", "crisis", "emergency", "support", "depressed", "anxiety", "lonely", "desperate", "struggling", "counseling", "distressed", "hurt", "pain", "grief", "trauma", "abuse", "danger", "risk", "urgent", "need assistance"]):
|
105 |
+
# Intervention logic here
|
106 |
if not st.session_state.ask_intervention:
|
107 |
+
st.session_state.ask_intervention = True
|
108 |
+
if st.button("It seems like you might need to talk to someone. Click here for immediate assistance."):
|
109 |
st.write("You can reach out to a certified therapist at +25493609747.")
|
110 |
|
111 |
# Interact with the selected model
|