Update app.py
This commit is contained in:
parent
baa70236c8
commit
2348315026
2
app.py
2
app.py
|
@ -33,7 +33,7 @@ def predict(text,
|
||||||
except:
|
except:
|
||||||
yield [[text,"No Model Found"]],[],"No Model Found"
|
yield [[text,"No Model Found"]],[],"No Model Found"
|
||||||
return
|
return
|
||||||
torch.cuda.empty_cache()
|
|
||||||
inputs = generate_prompt_with_history(text,history,tokenizer,max_length=max_context_length_tokens)
|
inputs = generate_prompt_with_history(text,history,tokenizer,max_length=max_context_length_tokens)
|
||||||
if inputs is False:
|
if inputs is False:
|
||||||
yield chatbot+[[text,"Sorry, the input is too long."]],history,"Generate Fail"
|
yield chatbot+[[text,"Sorry, the input is too long."]],history,"Generate Fail"
|
||||||
|
|
Loading…
Reference in New Issue