Fix return message when no model is loaded

This commit is contained in:
oobabooga 2023-05-28 22:46:32 -03:00
parent f27135bdd3
commit 9ee1e37121

View File

@ -167,7 +167,7 @@ def _generate_reply(question, state, eos_token=None, stopping_strings=None, is_c
if generate_func is None:
if shared.model_name == 'None' or shared.model is None:
logger.error("No model is loaded! Select one in the Model tab.")
yield question
yield ''
return
if shared.model_type in ['rwkv', 'llamacpp']: