mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-21 01:31:20 +00:00
fixed uninstall model
This commit is contained in:
parent
34f04bb427
commit
a1dc373d15
@ -428,7 +428,7 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
def uninstall_model(data):
|
||||
model_path = data['path']
|
||||
model_type:str=data.get("type","ggml")
|
||||
installation_dir = self.lollms_paths.personal_models_path/self.config["binding_name"]
|
||||
installation_dir = self.binding.searchModelParentFolder()
|
||||
|
||||
binding_folder = self.config["binding_name"]
|
||||
if model_type=="gptq":
|
||||
@ -450,7 +450,7 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
if not installation_path.exists():
|
||||
# Try to find a version
|
||||
model_path = installation_path.name.lower().replace("-ggml","").replace("-gguf","")
|
||||
candidates = [m for m in (self.lollms_paths.personal_models_path/self.binding.binding_folder_name).iterdir() if model_path in m.name]
|
||||
candidates = [m for m in installation_dir.iterdir() if model_path in m.name]
|
||||
if len(candidates)>0:
|
||||
model_path = candidates[0]
|
||||
installation_path = model_path
|
||||
|
Loading…
x
Reference in New Issue
Block a user