Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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]
|
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)
|