TurtleLiu commited on
Commit
388bbb8
·
1 Parent(s): eb80ed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,15 +6,15 @@ client = InferenceClient(
6
  )
7
 
8
 
9
- '''def format_prompt(message, history):
10
  prompt = "<s>"
11
  for user_prompt, bot_response in history:
12
  prompt += f"[INST] {user_prompt} [/INST]"
13
  prompt += f" {bot_response}</s> "
14
  prompt += f"[INST] {message} [/INST]"
15
  return prompt
16
- '''
17
 
 
18
  def format_prompt(message, history):
19
  prompt = "<s>"
20
  for user_prompt, bot_response in history:
@@ -22,6 +22,7 @@ def format_prompt(message, history):
22
  prompt += f" {bot_response}</s> "
23
  prompt += f"[INST] As a psychology counselor assistant, provide an assessment and plan for the following counseling notes. Please present a summary, don't make it so long. Present in lines.: {message} [/INST]"
24
  return prompt
 
25
  def generate(
26
  prompt, history, temperature=0.9, max_new_tokens=1024, top_p=0.95, repetition_penalty=1.0,
27
  ):
 
6
  )
7
 
8
 
9
+ def format_prompt(message, history):
10
  prompt = "<s>"
11
  for user_prompt, bot_response in history:
12
  prompt += f"[INST] {user_prompt} [/INST]"
13
  prompt += f" {bot_response}</s> "
14
  prompt += f"[INST] {message} [/INST]"
15
  return prompt
 
16
 
17
+ '''
18
  def format_prompt(message, history):
19
  prompt = "<s>"
20
  for user_prompt, bot_response in history:
 
22
  prompt += f" {bot_response}</s> "
23
  prompt += f"[INST] As a psychology counselor assistant, provide an assessment and plan for the following counseling notes. Please present a summary, don't make it so long. Present in lines.: {message} [/INST]"
24
  return prompt
25
+ '''
26
  def generate(
27
  prompt, history, temperature=0.9, max_new_tokens=1024, top_p=0.95, repetition_penalty=1.0,
28
  ):