From 9ee1e37121ec8af55d1ed6c01ba0d9ee62994e8b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 28 May 2023 22:46:32 -0300 Subject: [PATCH] Fix return message when no model is loaded --- modules/text_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/text_generation.py b/modules/text_generation.py index bc260d83..1e4f9cb8 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -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']: