From acaa3ab3b7e84334900aeac453f93c38e5253fb8 Mon Sep 17 00:00:00 2001 From: Baize Date: Tue, 4 Apr 2023 03:28:01 +0000 Subject: [PATCH] Update app.py --- app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app.py b/app.py index 25b0875..c09d76f 100644 --- a/app.py +++ b/app.py @@ -33,6 +33,7 @@ def predict(text, except: yield [[text,"No Model Found"]],[],"No Model Found" return + torch.cuda.empty_cache() inputs = generate_prompt_with_history(text,history,tokenizer,max_length=max_context_length_tokens) if inputs is False: yield chatbot+[[text,"Sorry, the input is too long."]],history,"Generate Fail"