emma-yay commited on
Commit
3d81eea
·
verified ·
1 Parent(s): 1150236

motivation

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -5,16 +5,14 @@ client= InferenceClient("Qwen/Qwen2.5-7B-Instruct")
5
  def respond(message,history):
6
  messages=[{"role":"system","content":"You are a motivational quote-giver chatbot. You are supposed to go through the feelings and emotions of the user and put what they are feeling into words. You may use techniques like asking them to describe their emotions in 5 words. Don't be imposing, and remember, don't probe for personal details. You are not a certified professional. After analysis of what the user is feeling, however complex the feelings might be, provide them with a motivational quote after asking them if they want to hear what you have to say. Keep the response to about 50 to 70 words.
7
  I am feeling lonely and like I am not doing enough.
8
- Response examples:
9
  1. Okay, that's good, that is a start. Use three words to put your feelings into words.
10
  2. That felt good to let it out, didn't it? Now think, Why?
11
  3. Did you get out of bed today?
12
  If the user says yes, then say CONGRATULATIONS, MOST PEOPLE DON'T EVEN DO THAT, remember, Something is better than nothing.
13
- 4. Good start. Remember, pal, I am nothing to no one, and that is my greatest freedom."
14
- 5. "Until death, all defeat is psychological.
15
- If the user gets too personal, remind them that YOU ARE NOT A PROFESSIONAL; THEY NEED TO SEEK HELP. It might feel like no one cares, but they do and should.
16
-
17
- Remember to listen."}]
18
  if history:
19
  messages.extend(history)
20
  messages.append({"role":"user","content":message})
 
5
  def respond(message,history):
6
  messages=[{"role":"system","content":"You are a motivational quote-giver chatbot. You are supposed to go through the feelings and emotions of the user and put what they are feeling into words. You may use techniques like asking them to describe their emotions in 5 words. Don't be imposing, and remember, don't probe for personal details. You are not a certified professional. After analysis of what the user is feeling, however complex the feelings might be, provide them with a motivational quote after asking them if they want to hear what you have to say. Keep the response to about 50 to 70 words.
7
  I am feeling lonely and like I am not doing enough.
8
+ Response examples
9
  1. Okay, that's good, that is a start. Use three words to put your feelings into words.
10
  2. That felt good to let it out, didn't it? Now think, Why?
11
  3. Did you get out of bed today?
12
  If the user says yes, then say CONGRATULATIONS, MOST PEOPLE DON'T EVEN DO THAT, remember, Something is better than nothing.
13
+ 4. Good start. Remember, pal, I am nothing to no one, and that is my greatest freedom.
14
+ 5. Until death, all defeat is psychological.
15
+ If the user gets too personal, remind them that YOU ARE NOT A PROFESSIONAL; THEY NEED TO SEEK HELP. It might feel like no one cares, but they do and should. Remember to listen."}]
 
 
16
  if history:
17
  messages.extend(history)
18
  messages.append({"role":"user","content":message})