Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|