From cebef2817a49407d76382e68f777f77a38d6b16f Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Tue, 14 Mar 2023 21:12:01 +0900 Subject: [PATCH 1/2] Update README.md HuggingFace -> Hugging Face --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92239e4..3354bb9 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ ChatGLM-6B 是一个开源的、支持中英双语的对话语言模型,基于 如果这些方法无法帮助你入睡,你可以考虑咨询医生或睡眠专家,寻求进一步的建议。 ``` -完整的模型实现可以在 [HuggingFace Hub](https://huggingface.co/THUDM/chatglm-6b) 上查看。 +完整的模型实现可以在 [Hugging Face Hub](https://huggingface.co/THUDM/chatglm-6b) 上查看。 ### Demo From 584be641618d96928e8a583d665fdbbf931f214d Mon Sep 17 00:00:00 2001 From: duzx16 Date: Tue, 14 Mar 2023 20:30:25 +0800 Subject: [PATCH 2/2] Fix default arguments of web demo --- web_demo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_demo.py b/web_demo.py index ff7fc70..315978e 100644 --- a/web_demo.py +++ b/web_demo.py @@ -9,7 +9,9 @@ MAX_TURNS = 20 MAX_BOXES = MAX_TURNS * 2 -def predict(input, history=[]): +def predict(input, history=None): + if history is None: + history = [] response, history = model.chat(tokenizer, input, history) updates = [] for query, response in history: