Omnibus commited on
Commit
8686afb
1 Parent(s): 2a37133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,10 +16,11 @@ InferenceClient(models[3]),
16
  def format_prompt(message, history):
17
  prompt = "<s>"
18
  if history:
 
19
  for user_prompt, bot_response in history:
20
- prompt += f"[INST] {user_prompt} [/INST]"
21
- prompt += f" {bot_response}</s> "
22
- prompt += f"[INST] {message} [/INST]"
23
  return prompt
24
 
25
 
 
16
  def format_prompt(message, history):
17
  prompt = "<s>"
18
  if history:
19
+ #<start_of_turn>userHow does the brain work?<end_of_turn><start_of_turn>model
20
  for user_prompt, bot_response in history:
21
+ prompt += f"<start_of_turn>user{user_prompt}<end_of_turn>"
22
+ prompt += f"<start_of_turn>model{bot_response}</s>"
23
+ prompt += f"<start_of_turn>user{message}<end_of_turn><start_of_turn>model"
24
  return prompt
25
 
26