mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
repared preset creation
This commit is contained in:
parent
5376ae0f5b
commit
01072bc67c
6
app.py
6
app.py
@ -517,11 +517,11 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
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)
|
||||
fn = preset_data.name.lower().replace(" ","_")
|
||||
|
||||
fn = preset_data["name"].lower().replace(" ","_")
|
||||
filename = presets_folder/f"{fn}.yaml"
|
||||
with open(filename, 'w', encoding='utf-8') as file:
|
||||
yaml.dump(preset_data)
|
||||
yaml.dump(preset_data, file)
|
||||
return jsonify({"status": True})
|
||||
|
||||
def del_preset(self):
|
||||
|
42
win_conda_session.bat
Normal file
42
win_conda_session.bat
Normal file
@ -0,0 +1,42 @@
|
||||
@echo off
|
||||
@echo Starting LOLLMS Web UI...
|
||||
echo " ___ ___ ___ ___ ___ ___ "
|
||||
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
|
||||
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
|
||||
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
|
||||
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
|
||||
echo "/:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
|
||||
echo "\:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
|
||||
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
|
||||
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
|
||||
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
|
||||
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
|
||||
echo By ParisNeo
|
||||
|
||||
cd /D "%~dp0"
|
||||
|
||||
@rem better isolation for virtual environment
|
||||
SET "CONDA_SHLVL="
|
||||
SET PYTHONNOUSERSITE=1
|
||||
SET "PYTHONPATH="
|
||||
SET "PYTHONHOME="
|
||||
SET "TEMP=%cd%\installer_files\temp"
|
||||
SET "TMP=%cd%\installer_files\temp"
|
||||
|
||||
@rem workaround for broken Windows installs
|
||||
set PATH=%PATH%;%SystemRoot%\system32
|
||||
|
||||
set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env
|
||||
set MINICONDA_DIR=%cd%\installer_files\miniconda3
|
||||
|
||||
if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo Miniconda not found. Please reinstall lollms using win_install.bat. && goto end )
|
||||
call "%MINICONDA_DIR%\Scripts\activate.bat" activate "%INSTALL_ENV_DIR%"
|
||||
cd lollms-webui
|
||||
|
||||
@rem set default cuda toolkit to the one in the environment
|
||||
set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
||||
|
||||
cmd.exe
|
||||
|
||||
:end
|
||||
pause
|
Loading…
Reference in New Issue
Block a user