forked from Huanshere/VideoLingo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOneKeyStart_uv.bat
More file actions
19 lines (16 loc) · 778 Bytes
/
OneKeyStart_uv.bat
File metadata and controls
19 lines (16 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
cd /D "%~dp0"
:: Log file with timestamp
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /value') do set dt=%%I
set LOGFILE=videolingo_%dt:~0,8%_%dt:~8,6%.log
echo [%date% %time%] VideoLingo starting... > "%LOGFILE%"
echo Log file: %LOGFILE%
if exist ".venv\Scripts\streamlit.exe" (
.venv\Scripts\streamlit run st.py 2>&1 | powershell -Command "$input | Tee-Object -FilePath '%LOGFILE%' -Append"
) else if exist ".venv\Scripts\python.exe" (
.venv\Scripts\python -m streamlit run st.py 2>&1 | powershell -Command "$input | Tee-Object -FilePath '%LOGFILE%' -Append"
) else (
echo ERROR: .venv not found. Please run setup first: | powershell -Command "$input | Tee-Object -FilePath '%LOGFILE%' -Append"
echo python setup_env.py
)
pause