Download start.sh from maxxcarl/mann: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/maxxcarl/mann/resolve/main/start.sh
- Command line
-
hf download hf://spaces/maxxcarl/mann/start.sh
-
curl -L -o start.sh https://huggingface.co/spaces/maxxcarl/mann/resolve/main/start.sh
707 Bytes
| echo "=== [HF Space] Starting Ollama + Qwen2.5 7B ===" | |
| echo "Time: $(date)" | |
| export OLLAMA_HOST=0.0.0.0 | |
| echo "Starting Ollama server..." | |
| ollama serve & | |
| sleep 5 | |
| echo "Waiting for Ollama..." | |
| for i in {1..60}; do | |
| if curl -s http://127.0.0.1:11434/api/tags >/dev/null 2>&1; then | |
| echo "β Ollama ready!" | |
| break | |
| fi | |
| sleep 3 | |
| done | |
| # Pull the new model | |
| if ! ollama list | grep -q "qwen2.5"; then | |
| echo "π₯ Downloading qwen2.5:7b-instruct (~4.7GB) - This will take time on first build..." | |
| ollama pull qwen2.5:7b-instruct | |
| else | |
| echo "β Model already downloaded" | |
| fi | |
| echo "π Starting FastAPI..." | |
| uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --workers 1 |