Spaces:
Runtime error
Runtime error
Download run_macOS.command from linzeliang/ChatGPT: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/spaces/linzeliang/ChatGPT/resolve/main/run_macOS.command
- Command line
-
hf download hf://spaces/linzeliang/ChatGPT/run_macOS.command
-
curl -L -o run_macOS.command https://huggingface.co/spaces/linzeliang/ChatGPT/resolve/main/run_macOS.command
474 Bytes
| # 获取脚本所在目录 | |
| script_dir=$(dirname "$0") | |
| # 将工作目录更改为脚本所在目录 | |
| cd "$script_dir" | |
| # 检查Git仓库是否有更新 | |
| git remote update | |
| pwd | |
| if ! git status -uno | grep 'up to date' > /dev/null; then | |
| # 如果有更新,关闭当前运行的服务器 | |
| pkill -f ChuanhuChatbot.py | |
| # 拉取最新更改 | |
| git pull | |
| # 安装依赖 | |
| pip3 install -r requirements.txt | |
| # 重新启动服务器 | |
| nohup python3 ChuanhuChatbot.py & | |
| fi | |