mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
fixed presets problem
This commit is contained in:
parent
c1203d96f5
commit
a1e9e73011
12
app.py
12
app.py
@ -493,11 +493,15 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
shutil.copy2(src_file, dest_file)
|
||||
|
||||
def get_presets(self):
|
||||
presets_folder = self.lollms_paths.personal_databases_path/"lollms_playground_presets"
|
||||
if not presets_folder.exists():
|
||||
presets_folder.mkdir(exist_ok=True, parents=True)
|
||||
self.copy_files("presets",presets_folder)
|
||||
presets = []
|
||||
presets_folder = Path("__file__").parent/"presets"
|
||||
for filename in presets_folder.glob('*.yaml'):
|
||||
with open(filename, 'r', encoding='utf-8') as file:
|
||||
preset = yaml.safe_load(file)
|
||||
if preset is not None:
|
||||
presets.append(preset)
|
||||
presets_folder = self.lollms_paths.personal_databases_path/"lollms_playground_presets"
|
||||
presets_folder.mkdir(exist_ok=True, parents=True)
|
||||
for filename in presets_folder.glob('*.yaml'):
|
||||
with open(filename, 'r', encoding='utf-8') as file:
|
||||
preset = yaml.safe_load(file)
|
||||
|
Loading…
Reference in New Issue
Block a user