DrSong commited on
Commit
2938f95
·
1 Parent(s): ad76258

Update max_length

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,10 +11,10 @@ tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=
11
  model = AutoModelForSeq2SeqLM.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).bfloat16()
12
 
13
  def chat(query, history=[]):
14
- _, history = model.chat(tokenizer, query, history, max_length=32)
15
  return history, history
16
 
17
- description = "This is an unofficial chatbot application based on open source model ChatGLM-6B, running on cpu(hence max_length is limited to 32)."
18
  title = "ChatGLM-6B Chatbot"
19
  examples = [["Hello?"], ["你好。"], ["介绍清华"]]
20
 
 
11
  model = AutoModelForSeq2SeqLM.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).bfloat16()
12
 
13
  def chat(query, history=[]):
14
+ _, history = model.chat(tokenizer, query, history, max_length=512)
15
  return history, history
16
 
17
+ description = "This is an unofficial chatbot application based on open source model ChatGLM-6B, running on cpu(hence max_length is limited to 512)."
18
  title = "ChatGLM-6B Chatbot"
19
  examples = [["Hello?"], ["你好。"], ["介绍清华"]]
20