Spaces:
Sleeping
Sleeping
Download start.sh from abyXsmart/FVG-Delta-Crypto-Core: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/abyXsmart/FVG-Delta-Crypto-Core/resolve/main/start.sh
- Command line
-
hf download hf://spaces/abyXsmart/FVG-Delta-Crypto-Core/start.sh
-
curl -L -o start.sh https://huggingface.co/spaces/abyXsmart/FVG-Delta-Crypto-Core/resolve/main/start.sh
1.18 kB
| # Hugging Face Spaces entrypoint | |
| # This script starts the MEXC SMC Scanner as a containerized Space service. | |
| set -euo pipefail | |
| # Detect if running inside a container and auto-set PORT | |
| if [[ -n "${HF_SPACE:-}" ]]; then | |
| echo "[HF Space] Running in Hugging Face Space" | |
| export PORT="${PORT:-7860}" | |
| fi | |
| # Guard: Telegram credentials are required | |
| if [[ -z "${TELEGRAM_BOT_TOKEN:-}" || -z "${TELEGRAM_CHAT_ID:-}" ]]; then | |
| echo "==============================================" | |
| echo " SETUP REQUIRED" | |
| echo "==============================================" | |
| echo "Add these secrets in your Hugging Face Space settings:" | |
| echo " - TELEGRAM_BOT_TOKEN" | |
| echo " - TELEGRAM_CHAT_ID" | |
| echo "" | |
| echo "Restart the Space after adding them." | |
| echo "==============================================" | |
| # Don't exit — keep the server running so the UI is visible | |
| # The scanner will log warnings on every cycle until creds are set | |
| fi | |
| # Upgrade pip in background so first request is fast | |
| python -m pip install --upgrade pip -q & | |
| cd /app | |
| python preflight_check.py || true | |
| exec uvicorn app:app --host 0.0.0.0 --port "${PORT:-7860}" |