KGSAGAR commited on
Commit
b3af2b6
·
verified ·
1 Parent(s): 4419107

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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
- 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
 
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