-
Notifications
You must be signed in to change notification settings - Fork 9
/
Start_App.bat
40 lines (28 loc) · 1.12 KB
/
Start_App.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
setlocal
REM Get the current directory of the batch file
set "SCRIPT_DIR=%~dp0"
REM Set the log file path
set "LOG_FILE=%SCRIPT_DIR%\StartApp_log.txt"
REM Change to the script directory
cd /d "%SCRIPT_DIR%"
REM Create and activate the main virtual environment
python -m venv venv
call venv\Scripts\activate
REM Install PyTorch, torchvision, and torchaudio from a specific index URL
REM python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 2>> "%LOG_FILE%"
REM Install openai-whisper from the GitHub repository
REM python -m pip install git+https://github.com/openai/whisper.git 2>> "%LOG_FILE%"
REM Install Playwright
REM python -m playwright install 2>> "%LOG_FILE%"
REM Install the remaining dependencies from requirements.txt
REM python -m pip install -r requirements.txt 2>> "%LOG_FILE%"
REM Execute the Python script (replace "main.py" with the actual file name)
python main.py 2>> "%LOG_FILE%"
REM Deactivate the virtual environment
deactivate
REM Display message and prompt user to exit
echo.
echo Batch file execution completed. Press any key to exit.
pause >nul
endlocal