hindi-ocr-api / start.sh
Angstormy's picture
Upload start.sh with huggingface_hub
e8f83fb verified
raw
history blame contribute delete
821 Bytes
#!/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