Tonic commited on
Commit
eb81939
1 Parent(s): 91f8c28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -357,7 +357,7 @@ class ChatBot:
357
  self.history = []
358
 
359
  def predict(self, user_input, system_prompt="You are an expert medical analyst:"):
360
- formatted_input = f"<s>[INST] {user_input}</s>[/INST]{system_prompt}"
361
  user_input_ids = tokenizer.encode(formatted_input, return_tensors="pt")
362
  response = peft_model.generate(input_ids=user_input_ids, max_length=512, pad_token_id=tokenizer.eos_token_id)
363
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)
 
357
  self.history = []
358
 
359
  def predict(self, user_input, system_prompt="You are an expert medical analyst:"):
360
+ formatted_input = f"<s>[INST]{system_prompt}:</s>[/INST][INST]{user_input}[INST]"
361
  user_input_ids = tokenizer.encode(formatted_input, return_tensors="pt")
362
  response = peft_model.generate(input_ids=user_input_ids, max_length=512, pad_token_id=tokenizer.eos_token_id)
363
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)