Spaces:
No application file
No application file
| # Start script cho Docker container | |
| # Chạy cả backend và frontend | |
| echo "🚀 Starting Transportation AI Platform..." | |
| # Start backend FastAPI server in background | |
| echo "📡 Starting Backend API Server..." | |
| uvicorn src.main:app --host 0.0.0.0 --port 3454 & | |
| BACKEND_PID=$! | |
| # Wait a bit for backend to start | |
| sleep 5 | |
| # Check if backend is running | |
| if curl -f http://localhost:3454/ > /dev/null 2>&1; then | |
| echo "✅ Backend API is running on port 3454" | |
| else | |
| echo "❌ Backend failed to start" | |
| exit 1 | |
| fi | |
| # Start frontend Gradio app | |
| echo "🎨 Starting Frontend Gradio App..." | |
| python app.py | |
| # Clean up background process on exit | |
| trap "kill $BACKEND_PID" EXIT | |