simonzhang5429 commited on
Commit
f669dd9
1 Parent(s): dd9b2b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -22,7 +22,7 @@ def generate(text):
22
  chat_data = []
23
  text = text.strip()
24
  if text:
25
- chat_data.append({"role": "system", "content": text})
26
  achat=tokenizer.apply_chat_template(chat_data,return_tensors="pt")
27
  #achat=tokenizer.encode(chat_data,return_tensors="pt",max_length=2048)
28
  outputs = model.generate(achat,
 
22
  chat_data = []
23
  text = text.strip()
24
  if text:
25
+ chat_data.append({"role": "user", "content": text})
26
  achat=tokenizer.apply_chat_template(chat_data,return_tensors="pt")
27
  #achat=tokenizer.encode(chat_data,return_tensors="pt",max_length=2048)
28
  outputs = model.generate(achat,