This commit is contained in:
Saifeddine ALOUI 2024-02-04 11:11:55 +01:00
parent 75329b7b6e
commit c505bdacc2
9 changed files with 752 additions and 233 deletions

@ -1 +1 @@
Subproject commit a2a1252fdaf042ab5ae6a409f15e226ffdc0e3d9
Subproject commit a326b1775b63b37b29f49f1968afd34b24afd7c2

View File

@ -0,0 +1,156 @@
@echo off
@rem This script will install miniconda and git with all dependencies for this project
@rem This enables a user to install this project without manually installing conda and git.
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo V9.5
echo -----------------
echo By ParisNeo
echo -----------------
@rem workaround for broken Windows installs
set PATH=%PATH%;%SystemRoot%\system32
cd /D "%~dp0"
echo "%cd%"| findstr /C:" " >nul && call :PrintBigMessage "This script relies on Miniconda which can not be silently installed under a path with spaces. Please put it in a path without spaces and try again" && goto failed
call :PrintBigMessage "WARNING: This script relies on Miniconda which will fail to install if the path is too long."
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
echo "%CD%"| findstr /R /C:"[!#\$%&()\*+,;<=>?@\[\]\^`{|}~]" >nul && (
call :PrintBigMessage %SPCHARMESSAGE%
)
set SPCHARMESSAGE=
pause
cls
md
@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"
set MINICONDA_DIR=%cd%\installer_files\miniconda3
set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
set REPO_URL=https://github.com/ParisNeo/lollms-webui.git
set "PACKAGES_TO_INSTALL=python=3.11 git pip"
if not exist "%MINICONDA_DIR%\Scripts\conda.exe" (
@rem download miniconda
echo Downloading Miniconda installer from %MINICONDA_DOWNLOAD_URL%
call curl -LOk "%MINICONDA_DOWNLOAD_URL%"
@rem install miniconda
echo. && echo Installing Miniconda To "%MINICONDA_DIR%" && echo Please Wait... && echo.
start "" /W /D "%cd%" "Miniconda3-latest-Windows-x86_64.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%MINICONDA_DIR% || ( echo. && echo Miniconda installer not found. && goto failed )
del /q "Miniconda3-latest-Windows-x86_64.exe"
if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo. && echo Miniconda install failed. && goto end )
)
@rem activate miniconda
call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end )
@rem create the installer env
if not exist "%INSTALL_ENV_DIR%" (
echo Packages to install: %PACKAGES_TO_INSTALL%
call conda create --no-shortcuts -y -k -p "%INSTALL_ENV_DIR%" %CHANNEL% %PACKAGES_TO_INSTALL% || ( echo. && echo Conda environment creation failed. && goto end )
)
@rem check if conda environment was actually created
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end )
@rem activate installer env
call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end )
@rem install conda library
call conda install conda -y
@rem clone the repository
if exist lollms-webui\ (
cd lollms-webui
git pull
git submodule update --init --recursive
cd
cd lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
) else (
git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git
git submodule update --init --recursive
cd lollms-webui\lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
)
pip install -r requirements.txt
@rem create launcher
if exist ..\win_run.bat (
echo Win run found
) else (
copy scripts\windows\win_run.bat ..\
)
if exist ..\win_conda_session.bat (
echo win conda session script found
) else (
copy scripts\windows\win_conda_session.bat ..\
)
call python zoos/bindings_zoo/remote_lollms/__init__.py
setlocal enabledelayedexpansion
endlocal
goto end
:PrintBigMessage
echo. && echo.
echo *******************************************************************
for %%M in (%*) do echo * %%~M
echo *******************************************************************
echo. && echo.
exit /b
goto end
:failed
echo Install failed
goto endend
:end
echo Creating a bin dir (required for llamacpp binding)
md ../installer_files/lollms_env/bin
@rem cd scripts\python\lollms_installer
@rem call python main.py
@rem cd ..
echo Installation complete.
:endend
pause

View File

@ -0,0 +1,156 @@
@echo off
@rem This script will install miniconda and git with all dependencies for this project
@rem This enables a user to install this project without manually installing conda and git.
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo V9.5
echo -----------------
echo By ParisNeo
echo -----------------
@rem workaround for broken Windows installs
set PATH=%PATH%;%SystemRoot%\system32
cd /D "%~dp0"
echo "%cd%"| findstr /C:" " >nul && call :PrintBigMessage "This script relies on Miniconda which can not be silently installed under a path with spaces. Please put it in a path without spaces and try again" && goto failed
call :PrintBigMessage "WARNING: This script relies on Miniconda which will fail to install if the path is too long."
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
echo "%CD%"| findstr /R /C:"[!#\$%&()\*+,;<=>?@\[\]\^`{|}~]" >nul && (
call :PrintBigMessage %SPCHARMESSAGE%
)
set SPCHARMESSAGE=
pause
cls
md
@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"
set MINICONDA_DIR=%cd%\installer_files\miniconda3
set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
set REPO_URL=https://github.com/ParisNeo/lollms-webui.git
set "PACKAGES_TO_INSTALL=python=3.11 git pip"
if not exist "%MINICONDA_DIR%\Scripts\conda.exe" (
@rem download miniconda
echo Downloading Miniconda installer from %MINICONDA_DOWNLOAD_URL%
call curl -LOk "%MINICONDA_DOWNLOAD_URL%"
@rem install miniconda
echo. && echo Installing Miniconda To "%MINICONDA_DIR%" && echo Please Wait... && echo.
start "" /W /D "%cd%" "Miniconda3-latest-Windows-x86_64.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%MINICONDA_DIR% || ( echo. && echo Miniconda installer not found. && goto failed )
del /q "Miniconda3-latest-Windows-x86_64.exe"
if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo. && echo Miniconda install failed. && goto end )
)
@rem activate miniconda
call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end )
@rem create the installer env
if not exist "%INSTALL_ENV_DIR%" (
echo Packages to install: %PACKAGES_TO_INSTALL%
call conda create --no-shortcuts -y -k -p "%INSTALL_ENV_DIR%" %CHANNEL% %PACKAGES_TO_INSTALL% || ( echo. && echo Conda environment creation failed. && goto end )
)
@rem check if conda environment was actually created
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end )
@rem activate installer env
call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end )
@rem install conda library
call conda install conda -y
@rem clone the repository
if exist lollms-webui\ (
cd lollms-webui
git pull
git submodule update --init --recursive
cd
cd lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
) else (
git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git
git submodule update --init --recursive
cd lollms-webui\lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
)
pip install -r requirements.txt
@rem create launcher
if exist ..\win_run.bat (
echo Win run found
) else (
copy scripts\windows\win_run.bat ..\
)
if exist ..\win_conda_session.bat (
echo win conda session script found
) else (
copy scripts\windows\win_conda_session.bat ..\
)
call python zoos/bindings_zoo/mistral_ai/__init__.py
setlocal enabledelayedexpansion
endlocal
goto end
:PrintBigMessage
echo. && echo.
echo *******************************************************************
for %%M in (%*) do echo * %%~M
echo *******************************************************************
echo. && echo.
exit /b
goto end
:failed
echo Install failed
goto endend
:end
echo Creating a bin dir (required for llamacpp binding)
md ../installer_files/lollms_env/bin
@rem cd scripts\python\lollms_installer
@rem call python main.py
@rem cd ..
echo Installation complete.
:endend
pause

View File

@ -0,0 +1,156 @@
@echo off
@rem This script will install miniconda and git with all dependencies for this project
@rem This enables a user to install this project without manually installing conda and git.
echo " ___ ___ ___ ___ ___ ___ "
echo " /\__\ /\ \ /\__\ /\__\ /\__\ /\ \ "
echo " /:/ / /::\ \ /:/ / /:/ / /::| | /::\ \ "
echo " /:/ / /:/\:\ \ /:/ / /:/ / /:|:| | /:/\ \ \ "
echo " /:/ / /:/ \:\ \ /:/ / /:/ / /:/|:|__|__ _\:\~\ \ \ "
echo " /:/__/ /:/__/ \:\__\ /:/__/ /:/__/ /:/ |::::\__\ /\ \:\ \ \__\ "
echo " \:\ \ \:\ \ /:/ / \:\ \ \:\ \ \/__/~~/:/ / \:\ \:\ \/__/ "
echo " \:\ \ \:\ /:/ / \:\ \ \:\ \ /:/ / \:\ \:\__\ "
echo " \:\ \ \:\/:/ / \:\ \ \:\ \ /:/ / \:\/:/ / "
echo " \:\__\ \::/ / \:\__\ \:\__\ /:/ / \::/ / "
echo " \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ "
echo V9.5
echo -----------------
echo By ParisNeo
echo -----------------
@rem workaround for broken Windows installs
set PATH=%PATH%;%SystemRoot%\system32
cd /D "%~dp0"
echo "%cd%"| findstr /C:" " >nul && call :PrintBigMessage "This script relies on Miniconda which can not be silently installed under a path with spaces. Please put it in a path without spaces and try again" && goto failed
call :PrintBigMessage "WARNING: This script relies on Miniconda which will fail to install if the path is too long."
set "SPCHARMESSAGE="WARNING: Special characters were detected in the installation path!" " This can cause the installation to fail!""
echo "%CD%"| findstr /R /C:"[!#\$%&()\*+,;<=>?@\[\]\^`{|}~]" >nul && (
call :PrintBigMessage %SPCHARMESSAGE%
)
set SPCHARMESSAGE=
pause
cls
md
@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"
set MINICONDA_DIR=%cd%\installer_files\miniconda3
set INSTALL_ENV_DIR=%cd%\installer_files\lollms_env
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
set REPO_URL=https://github.com/ParisNeo/lollms-webui.git
set "PACKAGES_TO_INSTALL=python=3.11 git pip"
if not exist "%MINICONDA_DIR%\Scripts\conda.exe" (
@rem download miniconda
echo Downloading Miniconda installer from %MINICONDA_DOWNLOAD_URL%
call curl -LOk "%MINICONDA_DOWNLOAD_URL%"
@rem install miniconda
echo. && echo Installing Miniconda To "%MINICONDA_DIR%" && echo Please Wait... && echo.
start "" /W /D "%cd%" "Miniconda3-latest-Windows-x86_64.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%MINICONDA_DIR% || ( echo. && echo Miniconda installer not found. && goto failed )
del /q "Miniconda3-latest-Windows-x86_64.exe"
if not exist "%MINICONDA_DIR%\Scripts\activate.bat" ( echo. && echo Miniconda install failed. && goto end )
)
@rem activate miniconda
call "%MINICONDA_DIR%\Scripts\activate.bat" || ( echo Miniconda hook not found. && goto end )
@rem create the installer env
if not exist "%INSTALL_ENV_DIR%" (
echo Packages to install: %PACKAGES_TO_INSTALL%
call conda create --no-shortcuts -y -k -p "%INSTALL_ENV_DIR%" %CHANNEL% %PACKAGES_TO_INSTALL% || ( echo. && echo Conda environment creation failed. && goto end )
)
@rem check if conda environment was actually created
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end )
@rem activate installer env
call conda activate "%INSTALL_ENV_DIR%" || ( echo. && echo Conda environment activation failed. && goto end )
@rem install conda library
call conda install conda -y
@rem clone the repository
if exist lollms-webui\ (
cd lollms-webui
git pull
git submodule update --init --recursive
cd
cd lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
) else (
git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git
git submodule update --init --recursive
cd lollms-webui\lollms_core
pip install -e .
cd ..
cd utilities\safe_store
pip install -e .
cd ..\..
)
pip install -r requirements.txt
@rem create launcher
if exist ..\win_run.bat (
echo Win run found
) else (
copy scripts\windows\win_run.bat ..\
)
if exist ..\win_conda_session.bat (
echo win conda session script found
) else (
copy scripts\windows\win_conda_session.bat ..\
)
call python zoos/bindings_zoo/ollama/__init__.py
setlocal enabledelayedexpansion
endlocal
goto end
:PrintBigMessage
echo. && echo.
echo *******************************************************************
for %%M in (%*) do echo * %%~M
echo *******************************************************************
echo. && echo.
exit /b
goto end
:failed
echo Install failed
goto endend
:end
echo Creating a bin dir (required for llamacpp binding)
md ../installer_files/lollms_env/bin
@rem cd scripts\python\lollms_installer
@rem call python main.py
@rem cd ..
echo Installation complete.
:endend
pause

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-14ba940c.js"></script>
<link rel="stylesheet" href="/assets/index-3f9023f9.css">
<script type="module" crossorigin src="/assets/index-4c104035.js"></script>
<link rel="stylesheet" href="/assets/index-b2ee99e7.css">
</head>
<body>
<div id="app"></div>

View File

@ -772,8 +772,40 @@
</tr>
</table>
</Card>
<Card title="Whisper audio transcription" :is_subcard="true" class="pb-2 m-2">
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<tr>
<td style="min-width: 200px;">
<label for="whisper_model" class="text-sm font-bold" style="margin-right: 1rem;">Whisper model:</label>
</td>
<td>
<div class="flex flex-row">
<select
id="whisper_model"
v-model="configFile.audio_in_language"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<!-- Options with language codes and corresponding language names -->
<option v-for="whispermodel in whisperModels" :key="whispermodel" :value="whispermodel">
{{ whispermodel }}
</option>
</select>
<input
type="checkbox"
id="activate_audio_infos"
required
v-model="configFile.whisper_model"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
</tr>
</table>
</Card>
<Card title="Browser Audio" :is_subcard="true" class="pb-2 m-2">
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<tr>
@ -4427,7 +4459,26 @@ export default {
this.$store.state.config.audio_out_voice = value;
},
},
whisperModels(){
return [
"base",
"base.en",
"base.fr",
"base.es",
"small",
"small.en",
"small.fr",
"small.es",
"medium",
"medium.en",
"medium.fr",
"medium.es",
"large",
"large.en",
"large.fr",
"large.es",
]
},
audioLanguages() {
// Replace this with your own list of language codes and names
// Example data structure: [{ code: 'en-US', name: 'English (US)' }, ...]

@ -1 +1 @@
Subproject commit 49d29334590f956eec08eee7730c3c18859f37f3
Subproject commit 48bfff35463c2ade4b690002ae3fefaf97a99ee9