fastsdcpu / start-webserver.sh
Rodneyontherock1067's picture
Upload folder using huggingface_hub
87c5489 verified
raw
history blame contribute delete
No virus
625 Bytes
#!/usr/bin/env bash
echo Starting FastSD CPU please wait...
set -e
PYTHON_COMMAND="python3"
if ! command -v python3 &>/dev/null; then
if ! command -v python &>/dev/null; then
echo "Error: Python not found, please install python 3.8 or higher and try again"
exit 1
fi
fi
if command -v python &>/dev/null; then
PYTHON_COMMAND="python"
fi
echo "Found $PYTHON_COMMAND command"
python_version=$($PYTHON_COMMAND --version 2>&1 | awk '{print $2}')
echo "Python version : $python_version"
BASEDIR=$(pwd)
# shellcheck disable=SC1091
source "$BASEDIR/env/bin/activate"
$PYTHON_COMMAND src/app.py --api