From 4a47bf559d56e6685b7c916df7cf5e1987347f9d Mon Sep 17 00:00:00 2001 From: wsl-wy Date: Tue, 8 Aug 2023 02:52:43 +0800 Subject: [PATCH] support pass model_revision with 'None' as using default --- web_demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_demo.py b/web_demo.py index 2a9c29b..32a1529 100755 --- a/web_demo.py +++ b/web_demo.py @@ -28,7 +28,7 @@ model = AutoModelForCausalLM.from_pretrained( device_map="auto", trust_remote_code=True, resume_download=True, - **{"revision": args.model_revision} if args.model_revision is not None and args.model_revision != "" else {}, + **{"revision": args.model_revision} if args.model_revision is not None and args.model_revision != "" and args.model_revision != "None" else {}, ).eval() model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-7B-Chat", trust_remote_code=True, resume_download=True)