This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use get image (when comfyui api not available for user)
add daemon/stop script for linux
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# get current path | ||
CUR_DIR="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")" | ||
PROJECT_PATH=$(dirname $(dirname "$CUR_DIR")) | ||
echo "$PROJECT_PATH" | ||
cd $PROJECT_PATH | ||
|
||
# set LOGURU_LEVEL to ERROR | ||
export LOGURU_LEVEL=INFO | ||
|
||
export STREAMLIT_SERVER_PORT=8501 | ||
# set COMFYFLOW_API_URL to comfyflow api url | ||
export COMFYFLOW_API_URL=https://api.comfyflow.app | ||
# set COMFYUI_SERVER_ADDR to comfyui server addr | ||
export COMFYUI_SERVER_ADDR=http://localhost:8188 | ||
# set discord callback url | ||
export DISCORD_REDIRECT_URI=http://localhost:8501 | ||
# set MODE to Creator | ||
export MODE=Creator | ||
|
||
# script params | ||
nohup python -m streamlit run Home.py > app.log 2>&1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# 停止脚本 | ||
APP_NAME="streamlit" | ||
|
||
# 查找并终止正在运行的 Flask 应用程序进程 | ||
PID=$(ps aux | grep "$APP_NAME" | grep -v grep | awk '{print $2}') | ||
if [ -n "$PID" ]; then | ||
echo "Stopping $APP_NAME $PID..." | ||
kill $PID | ||
echo "Stoped $APP_NAME" | ||
else | ||
echo "$APP_NAME is not running." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters