Skip to content

Commit

Permalink
Merge pull request #177 from jhj0517/fix/remove-redundant-batches
Browse files Browse the repository at this point in the history
Fix/remove redundant batches
  • Loading branch information
jhj0517 authored Jun 25, 2024
2 parents 32509de + 9691021 commit 0450240
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
6 changes: 2 additions & 4 deletions Install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ if not exist "%~dp0\venv\Scripts" (
echo Creating venv...
python -m venv venv
)

echo checked the venv folder. now installing requirements..
cd /d "%~dp0\venv\Scripts"
call activate.bat

cd /d "%~dp0"
call "%~dp0\venv\scripts\activate"

pip install -r requirements.txt

if errorlevel 1 (
Expand Down
17 changes: 3 additions & 14 deletions start-webui.bat
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
@echo off

goto :activate_venv
call venv\scripts\activate
python app.py

:launch
%PYTHON% app.py %*
echo "launching the app"
pause

:activate_venv
set PYTHON="%~dp0\venv\Scripts\Python.exe"
echo venv %PYTHON%
goto :launch

:endofscript

echo.
echo Launch unsuccessful. Exiting.
pause
7 changes: 2 additions & 5 deletions start-webui.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash

PYTHON="./venv/bin/python"
echo "venv ${PYTHON}"
echo ""

$PYTHON ./app.py
source venv/bin/activate
python app.py

echo "launching the app"
2 changes: 1 addition & 1 deletion user-start-webui.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ if not "%INSANELY_FAST_WHISPER_MODEL_DIR%"=="" (
set INSANELY_FAST_WHISPER_MODEL_DIR_ARG=--insanely_fast_whisper_model_dir "%INSANELY_FAST_WHISPER_MODEL_DIR%"
)

:: Call the original .bat script with optional arguments
:: Call the original .bat script with cli arguments
start-webui.bat %SERVER_NAME_ARG% %SERVER_PORT_ARG% %USERNAME_ARG% %PASSWORD_ARG% %SHARE_ARG% %THEME_ARG% %API_OPEN% %WHISPER_TYPE_ARG% %WHISPER_MODEL_DIR_ARG% %FASTER_WHISPER_MODEL_DIR_ARG% %INSANELY_FAST_WHISPER_MODEL_DIR_ARG%
pause

0 comments on commit 0450240

Please sign in to comment.