Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
•
71f0617
1
Parent(s):
5550401
更新macOS/Linux/Windows的脚本文件
Browse files- chatgpt - macOS.command +0 -7
- run_Linux.sh +25 -0
- chatgpt - windows.bat → run_Windows.bat +0 -9
- run_macOS.command +25 -0
chatgpt - macOS.command
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
echo Opening ChuanhuChatGPT...
|
3 |
-
cd "$(dirname "${BASH_SOURCE[0]}")"
|
4 |
-
nohup python3 ChuanhuChatbot.py >/dev/null 2>&1 &
|
5 |
-
sleep 5
|
6 |
-
open http://127.0.0.1:7860
|
7 |
-
echo Finished opening ChuanhuChatGPT (http://127.0.0.1:7860/). If you kill ChuanhuChatbot, Use "pkill -f 'ChuanhuChatbot'" command in terminal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
run_Linux.sh
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# 获取脚本所在目录
|
4 |
+
script_dir=$(dirname "$0")
|
5 |
+
|
6 |
+
# 将工作目录更改为脚本所在目录
|
7 |
+
cd "$script_dir"
|
8 |
+
|
9 |
+
# 检查Git仓库是否有更新
|
10 |
+
git remote update
|
11 |
+
pwd
|
12 |
+
|
13 |
+
if ! git status -uno | grep 'up to date' > /dev/null; then
|
14 |
+
# 如果有更新,关闭当前运行的服务器
|
15 |
+
pkill -f ChuanhuChatbot.py
|
16 |
+
|
17 |
+
# 拉取最新更改
|
18 |
+
git pull
|
19 |
+
|
20 |
+
# 安装依赖
|
21 |
+
pip3 install -r requirements.txt
|
22 |
+
|
23 |
+
# 重新启动服务器
|
24 |
+
nohup python3 ChuanhuChatbot.py &
|
25 |
+
fi
|
chatgpt - windows.bat → run_Windows.bat
RENAMED
@@ -3,12 +3,3 @@ echo Opening ChuanhuChatGPT...
|
|
3 |
|
4 |
REM Open powershell via bat
|
5 |
start powershell.exe -NoExit -Command "python ./ChuanhuChatbot.py"
|
6 |
-
|
7 |
-
REM The web page can be accessed with delayed start http://127.0.0.1:7860/
|
8 |
-
ping -n 5 127.0.0.1>nul
|
9 |
-
|
10 |
-
REM access chargpt via your default browser
|
11 |
-
start "" "http://127.0.0.1:7860/"
|
12 |
-
|
13 |
-
|
14 |
-
echo Finished opening ChuanhuChatGPT (http://127.0.0.1:7860/).
|
|
|
3 |
|
4 |
REM Open powershell via bat
|
5 |
start powershell.exe -NoExit -Command "python ./ChuanhuChatbot.py"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
run_macOS.command
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# 获取脚本所在目录
|
4 |
+
script_dir=$(dirname "$0")
|
5 |
+
|
6 |
+
# 将工作目录更改为脚本所在目录
|
7 |
+
cd "$script_dir"
|
8 |
+
|
9 |
+
# 检查Git仓库是否有更新
|
10 |
+
git remote update
|
11 |
+
pwd
|
12 |
+
|
13 |
+
if ! git status -uno | grep 'up to date' > /dev/null; then
|
14 |
+
# 如果有更新,关闭当前运行的服务器
|
15 |
+
pkill -f ChuanhuChatbot.py
|
16 |
+
|
17 |
+
# 拉取最新更改
|
18 |
+
git pull
|
19 |
+
|
20 |
+
# 安装依赖
|
21 |
+
pip3 install -r requirements.txt
|
22 |
+
|
23 |
+
# 重新启动服务器
|
24 |
+
nohup python3 ChuanhuChatbot.py &
|
25 |
+
fi
|