From dcbdd369adf42f6ef1156ce7e79780ed89e66050 Mon Sep 17 00:00:00 2001 From: Konstantin Gukov Date: Thu, 25 May 2023 17:42:47 +0200 Subject: [PATCH] Redundant else --- gpt4all-bindings/python/gpt4all/gpt4all.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gpt4all-bindings/python/gpt4all/gpt4all.py b/gpt4all-bindings/python/gpt4all/gpt4all.py index 1cc66c49..73f0194f 100644 --- a/gpt4all-bindings/python/gpt4all/gpt4all.py +++ b/gpt4all-bindings/python/gpt4all/gpt4all.py @@ -146,6 +146,7 @@ class GPT4All(): raise RuntimeError( "An error occurred during download. Downloaded file may not work." ) + # Sleep for a little bit so OS can remove file lock time.sleep(2) @@ -309,8 +310,8 @@ class GPT4All(): return pyllmodel.LlamaModel() elif model_name in MPT_MODELS: return pyllmodel.MPTModel() - else: - err_msg = f"""No corresponding model for provided filename {model_name}. - If this is a custom model, make sure to specify a valid model_type. - """ - raise ValueError(err_msg) + + err_msg = f"""No corresponding model for provided filename {model_name}. + If this is a custom model, make sure to specify a valid model_type. + """ + raise ValueError(err_msg)