CMLL commited on
Commit
1a6d301
1 Parent(s): ff9b690

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ def single_turn_chat(question):
23
 
24
  prompt = f"Question: {question}"
25
  messages = [
26
- {"role": "system", "content": "You are a helpful TCM medical assistant named 仲景中医大语言模型, created by 医哲未来 of Fudan University."},
27
  {"role": "user", "content": prompt}
28
  ]
29
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
@@ -43,7 +43,7 @@ def multi_turn_chat(question, chat_history=None):
43
  raise ValueError("The question must be a string.")
44
 
45
  if chat_history is None or chat_history == []:
46
- chat_history = [{"role": "system", "content": "You are a helpful TCM medical assistant named 仲景中医大语言模型, created by 医哲未来 of Fudan University."}]
47
 
48
  chat_history.append({"role": "user", "content": question})
49
 
 
23
 
24
  prompt = f"Question: {question}"
25
  messages = [
26
+ {"role": "system", "content": "You are a helpful TCM assistant named 仲景中医大语言模型, created by 医哲未来. You can switch between Chinese and English based on user preference."},
27
  {"role": "user", "content": prompt}
28
  ]
29
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
 
43
  raise ValueError("The question must be a string.")
44
 
45
  if chat_history is None or chat_history == []:
46
+ chat_history = [{"role": "system", "content": "You are a helpful TCM assistant named 仲景中医大语言模型, created by 医哲未来. You can switch between Chinese and English based on user preference."}]
47
 
48
  chat_history.append({"role": "user", "content": question})
49