pro-grammer commited on
Commit
9aeae97
·
verified ·
1 Parent(s): 5fb6e0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -25,15 +25,15 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
25
  response += token_text
26
  yield response
27
 
28
- if "Human" in response:
29
- location = response.find("Human")
30
- response = response[0:location]
31
- if "Me" in response:
32
- location = response.find("Me")
33
- response = response[0:location]
34
- if "You" in response:
35
- location = response.find("You")
36
- response = response[0:location]
37
 
38
  # Print disclaimer at the end
39
  print("""IMPORTANT: I am an AI project created to demonstrate therapeutic conversation patterns and am not a licensed mental health professional. If you're struggling with any emotional, mental health, or personal challenges, please seek help from a qualified therapist. You can find licensed therapists at BetterHelp.com.
 
25
  response += token_text
26
  yield response
27
 
28
+ if "Human" in response:
29
+ location = response.find("Human")
30
+ response = response[0:location]
31
+ if "Me" in response:
32
+ location = response.find("Me")
33
+ response = response[0:location]
34
+ if "You" in response:
35
+ location = response.find("You")
36
+ response = response[0:location]
37
 
38
  # Print disclaimer at the end
39
  print("""IMPORTANT: I am an AI project created to demonstrate therapeutic conversation patterns and am not a licensed mental health professional. If you're struggling with any emotional, mental health, or personal challenges, please seek help from a qualified therapist. You can find licensed therapists at BetterHelp.com.