Update app.py

This commit is contained in:
Baize 2023-04-04 03:50:13 +00:00 committed by huggingface-web
parent baa70236c8
commit 2348315026
1 changed files with 1 additions and 1 deletions

2
app.py
View File

@ -33,7 +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"