test / start.sh
AndrewKapok's picture
Upload 3 files
83ec0f7 verified
raw
history blame contribute delete
345 Bytes
#!/bin/bash
# 后台启动 Ollama 服务
ollama serve &
# 等待 Ollama API 就绪(最多尝试 30 秒)
for i in {1..30}; do
if curl -s http://localhost:11434/api/tags > /dev/null; then
echo "Ollama is ready."
break
fi
echo "Waiting for Ollama... ($i/30)"
sleep 1
done
# 启动 Gradio 应用
python3 /app.py