Tonic commited on
Commit
2bfa5f4
·
1 Parent(s): 281fb7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,7 +25,8 @@ tokenizer.eos_token_id = eos_token_id
25
  model.config.eos_token_id = eos_token_id
26
 
27
  def format_prompt(user_message, system_message="I am YiTonic, an AI language model created by Tonic-AI. I am a cautious assistant. I carefully follow instructions. I am helpful and harmless and I follow ethical guidelines and promote positive behavior."):
28
- prompt = f'{"role": "user", "content": "{system_message}{user_message}"}'
 
29
  return prompt
30
 
31
  def predict(message, system_message, max_new_tokens=4056, temperature=3.5, top_p=0.9, top_k=800, model_max_length = 32000, do_sample=False):
 
25
  model.config.eos_token_id = eos_token_id
26
 
27
  def format_prompt(user_message, system_message="I am YiTonic, an AI language model created by Tonic-AI. I am a cautious assistant. I carefully follow instructions. I am helpful and harmless and I follow ethical guidelines and promote positive behavior."):
28
+ prompt_dict = {"role": "user", "content": f"{system_message}{user_message}"}
29
+ prompt = str(prompt_dict)
30
  return prompt
31
 
32
  def predict(message, system_message, max_new_tokens=4056, temperature=3.5, top_p=0.9, top_k=800, model_max_length = 32000, do_sample=False):