zenvolt-api / start_api.sh
happynickamazon's picture
Upload 45 files
dc610d2 verified
Raw History Blame Contribute Delete
1.23 kB
#!/bin/bash
# Start ZenVolt NASA SOH Trust Engine API Service
echo "=================================================================================="
echo "Starting ZenVolt NASA SOH Trust Engine API"
echo "=================================================================================="
echo ""
echo "Checking model files..."
if [ ! -f "./models/nasa_soh_model.pkl" ]; then
echo "❌ ERROR: Model not found: ./models/nasa_soh_model.pkl"
echo " Please run: python production_pipeline_v2.py"
exit 1
fi
if [ ! -f "./models/feature_pipeline_causal.pkl" ]; then
echo "❌ ERROR: Feature pipeline not found: ./models/feature_pipeline_causal.pkl"
echo " Please run: python production_pipeline_v2.py"
exit 1
fi
echo "✅ Model files found"
echo ""
echo "Starting API service on http://localhost:8000"
echo ""
echo "Endpoints:"
echo " POST /api/predict - Predict battery health"
echo " GET /api/model-info - Get model information"
echo " GET /api/visualizations/{plot_name} - Get visualization images"
echo " GET /health - Health check"
echo ""
echo "Press Ctrl+C to stop"
echo "=================================================================================="
echo ""
python api_service.py