ogegadavis254 commited on
Commit
ba015b5
·
verified ·
1 Parent(s): 0316418

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- # Intervention logic here
106
  if not st.session_state.ask_intervention:
107
- if st.button("After analysing this chat i think you might need to talk to a therapist: You can reach out to a certified therapist at +25493609747. Name; Davis Ogega"):
108
- st.session_state.ask_intervention = True
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