Omnibus commited on
Commit
e9b47ff
1 Parent(s): 9b9128d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -13,7 +13,14 @@ InferenceClient(models[1]),
13
  InferenceClient(models[2]),
14
  InferenceClient(models[3]),
15
  ]
16
-
 
 
 
 
 
 
 
17
 
18
 
19
 
 
13
  InferenceClient(models[2]),
14
  InferenceClient(models[3]),
15
  ]
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
 
26