Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,14 +25,14 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
|
|
| 25 |
|
| 26 |
if tokenizer is None or peft_model is None:
|
| 27 |
return "Model loading failed. Please check the logs."
|
| 28 |
-
|
| 29 |
# Construct the prompt
|
| 30 |
prompt = system_message
|
| 31 |
-
for user_msg, assistant_msg in history:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
prompt += f"\n<user> input:{message} output:"
|
| 37 |
|
| 38 |
# Tokenize the input prompt
|
|
|
|
| 25 |
|
| 26 |
if tokenizer is None or peft_model is None:
|
| 27 |
return "Model loading failed. Please check the logs."
|
| 28 |
+
prompt = ''
|
| 29 |
# Construct the prompt
|
| 30 |
prompt = system_message
|
| 31 |
+
# for user_msg, assistant_msg in history:
|
| 32 |
+
# if user_msg:
|
| 33 |
+
# prompt += f"\nUser: {user_msg} output: "
|
| 34 |
+
# if assistant_msg:
|
| 35 |
+
# prompt += f"\nAssistant: {assistant_msg}"
|
| 36 |
prompt += f"\n<user> input:{message} output:"
|
| 37 |
|
| 38 |
# Tokenize the input prompt
|