Spaces:
Build error
Build error
Update max_length
Browse files
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=
|
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
|
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 |
|