class.py off by 1

This commit is contained in:
Concedo 2023-09-16 23:01:12 +08:00
parent f6ba36dff6
commit 733127b160

View file

@ -41,7 +41,7 @@ class model_backend(InferenceModel):
foundfile = False foundfile = False
try: try:
files = os.listdir(model_path) files = os.listdir(model_path)
foundfile = len([filename for filename in files if (("ggml" in filename.lower() and ".bin" in filename.lower()) or ".gguf" in filename.lower())])>1 foundfile = len([filename for filename in files if (("ggml" in filename.lower() and ".bin" in filename.lower()) or ".gguf" in filename.lower())])>0
except: except:
pass pass
return foundfile return foundfile