Update app.py
Browse files
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"
|
21 |
-
prompt += f"
|
22 |
-
prompt += f"
|
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 |
|