Spaces:
Runtime error
Runtime error
File size: 821 Bytes
e8f83fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/bash
set -e
echo "=========================================================="
echo "🚀 STARTING DEPLOYMENT WORKFLOW..."
echo "=========================================================="
# Check if model exists, if not, download it with a clear log
if [ ! -d "trocr-large-english" ]; then
echo "📦 English Model not found locally. Running downloader..."
python download_model.py
else
echo "✅ English Model found locally. Skipping download step."
fi
echo "=========================================================="
echo "🧠 STARTING UVICORN SERVER (LOADING MODELS INTO RAM)"
echo "This step may take 15-30 seconds. Do not interrupt..."
echo "=========================================================="
# Start the FastAPI server using Uvicorn
exec uvicorn api:app --host 0.0.0.0 --port 7860
|