nikravan commited on
Commit
582365f
·
verified ·
1 Parent(s): 1e98994

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -62,10 +62,10 @@ def predict(message, history, system_prompt, temperature, max_new_tokens, top_k,
62
  # instruction += f'<|im_start|>user\n{message}\n<|im_end|>\n<|im_start|>assistant\n'
63
 
64
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
65
- instruction = 'system\n' + system_prompt + '\n'
66
  for user, assistant in history:
67
- instruction += f'user\n{user}\nassistant\n{assistant}\n'
68
- instruction += f'user\n{message}\nassistant\n'
69
 
70
  print(instruction)
71
 
 
62
  # instruction += f'<|im_start|>user\n{message}\n<|im_end|>\n<|im_start|>assistant\n'
63
 
64
  stop_tokens = ["<|endoftext|>", "<|im_end|>"]
65
+ instruction = '<|System|>\n' + system_prompt + '\n'
66
  for user, assistant in history:
67
+ instruction += f'<|User|>\n{user}\n<|Assistant|>\n{assistant}\n'
68
+ instruction += f'<|User|>\n{message}\n<|Assistant|>\n'
69
 
70
  print(instruction)
71