Spaces:
Sleeping
Sleeping
2p990i9hpral commited on
Support easier install for windows users (#837)
Browse files* Add korean language set
Add korean language set
* Support easier install for windows users
added install.bat (create venv and install requirements)
and modify the project to use venv.
- Install_Windows.bat +22 -0
- run_Windows.bat +10 -2
Install_Windows.bat
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@echo off
|
| 2 |
+
|
| 3 |
+
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 (
|
| 16 |
+
echo.
|
| 17 |
+
echo Requirements installation failed. please remove venv folder and run install.bat again.
|
| 18 |
+
) else (
|
| 19 |
+
echo.
|
| 20 |
+
echo Requirements installed successfully.
|
| 21 |
+
)
|
| 22 |
+
pause
|
run_Windows.bat
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
@echo off
|
| 2 |
echo Opening ChuanhuChatGPT...
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
@echo off
|
| 2 |
echo Opening ChuanhuChatGPT...
|
| 3 |
|
| 4 |
+
goto :activate_venv
|
| 5 |
+
|
| 6 |
+
:launch
|
| 7 |
+
%PYTHON% ChuanhuChatbot.py %*
|
| 8 |
+
pause
|
| 9 |
+
|
| 10 |
+
:activate_venv
|
| 11 |
+
set PYTHON="%~dp0\venv\Scripts\Python.exe"
|
| 12 |
+
echo venv %PYTHON%
|
| 13 |
+
goto :launch
|