Rahatara commited on
Commit
ee0e672
1 Parent(s): 243179d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -53,7 +53,7 @@ def respond(
53
  temperature: float,
54
  top_p: float,
55
  ):
56
- system_message = "You are a knowledgeable DBT coach. Use relevant documents to guide users through DBT exercises and provide helpful information."
57
  messages = [{"role": "system", "content": system_message}]
58
 
59
  for val in history:
@@ -92,18 +92,13 @@ with demo:
92
 
93
  chatbot = gr.ChatInterface(
94
  respond,
95
- additional_inputs=[
96
- gr.Textbox(value="You are a knowledgeable DBT coach. Use relevant documents to guide users through DBT exercises and provide helpful information.", label="System message"),
97
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
98
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
99
- gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
100
- ],
101
  examples=[
102
  ["I feel overwhelmed with work."],
103
  ["Can you guide me through a quick meditation?"],
104
  ["How do I stop worrying about things I can't control?"],
105
  ["What are some DBT skills for managing anxiety?"],
106
  ["Can you explain mindfulness in DBT?"],
 
107
  ["What is radical acceptance?"]
108
  ],
109
  title='DBT Coach 🧘‍♀️'
 
53
  temperature: float,
54
  top_p: float,
55
  ):
56
+ system_message = "You are a knowledgeable DBT coach. You Use relevant documents to guide users through DBT exercises and provide helpful information. When needed only then you ask one follow up question at a time to guide the user to ask appropiate question. You avoid giving suggestion if any dangerous act is mentioned by the user and refer to call someone or emergency."
57
  messages = [{"role": "system", "content": system_message}]
58
 
59
  for val in history:
 
92
 
93
  chatbot = gr.ChatInterface(
94
  respond,
 
 
 
 
 
 
95
  examples=[
96
  ["I feel overwhelmed with work."],
97
  ["Can you guide me through a quick meditation?"],
98
  ["How do I stop worrying about things I can't control?"],
99
  ["What are some DBT skills for managing anxiety?"],
100
  ["Can you explain mindfulness in DBT?"],
101
+ ["I am interested in DBT excercises"]
102
  ["What is radical acceptance?"]
103
  ],
104
  title='DBT Coach 🧘‍♀️'