File size: 1,229 Bytes
dc610d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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