jhj0517 commited on
Commit
a39ca61
1 Parent(s): 363657b

remove redundant part

Browse files
Files changed (4) hide show
  1. Install.bat +2 -4
  2. start-webui.bat +3 -14
  3. start-webui.sh +2 -5
  4. user-start-webui.bat +1 -1
Install.bat CHANGED
@@ -4,12 +4,10 @@ if not exist "%~dp0\venv\Scripts" (
4
  echo Creating venv...
5
  python -m venv venv
6
  )
7
-
8
  echo checked the venv folder. now installing requirements..
9
- cd /d "%~dp0\venv\Scripts"
10
- call activate.bat
11
 
12
- cd /d "%~dp0"
 
13
  pip install -r requirements.txt
14
 
15
  if errorlevel 1 (
 
4
  echo Creating venv...
5
  python -m venv venv
6
  )
 
7
  echo checked the venv folder. now installing requirements..
 
 
8
 
9
+ call "%~dp0\venv\scripts\activate"
10
+
11
  pip install -r requirements.txt
12
 
13
  if errorlevel 1 (
start-webui.bat CHANGED
@@ -1,18 +1,7 @@
1
  @echo off
2
 
3
- goto :activate_venv
 
4
 
5
- :launch
6
- %PYTHON% app.py %*
7
  pause
8
-
9
- :activate_venv
10
- set PYTHON="%~dp0\venv\Scripts\Python.exe"
11
- echo venv %PYTHON%
12
- goto :launch
13
-
14
- :endofscript
15
-
16
- echo.
17
- echo Launch unsuccessful. Exiting.
18
- pause
 
1
  @echo off
2
 
3
+ call venv/scripts/activate
4
+ python app.py
5
 
6
+ echo "launching the app"
 
7
  pause
 
 
 
 
 
 
 
 
 
 
 
start-webui.sh CHANGED
@@ -1,9 +1,6 @@
1
  #!/bin/bash
2
 
3
- PYTHON="./venv/bin/python"
4
- echo "venv ${PYTHON}"
5
- echo ""
6
-
7
- $PYTHON ./app.py
8
 
9
  echo "launching the app"
 
1
  #!/bin/bash
2
 
3
+ source venv/bin/activate
4
+ python app.py
 
 
 
5
 
6
  echo "launching the app"
user-start-webui.bat CHANGED
@@ -52,6 +52,6 @@ if not "%INSANELY_FAST_WHISPER_MODEL_DIR%"=="" (
52
  set INSANELY_FAST_WHISPER_MODEL_DIR_ARG=--insanely_fast_whisper_model_dir "%INSANELY_FAST_WHISPER_MODEL_DIR%"
53
  )
54
 
55
- :: Call the original .bat script with optional arguments
56
  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%
57
  pause
 
52
  set INSANELY_FAST_WHISPER_MODEL_DIR_ARG=--insanely_fast_whisper_model_dir "%INSANELY_FAST_WHISPER_MODEL_DIR%"
53
  )
54
 
55
+ :: Call the original .bat script with cli arguments
56
  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%
57
  pause