File size: 573 Bytes
4b35062
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

echo "πŸš€ Activating Quantum-API Startup"

# Start FastAPI (api.main:app) on port 7860
echo "πŸŒ€ Starting FastAPI on port 7860..."
uvicorn api.main:app --host 0.0.0.0 --port 7860 &> fastapi.log &

# Wait 3 seconds
sleep 3

# Show FastAPI logs if it failed
if ! pgrep -f "uvicorn api.main:app" > /dev/null; then
    echo "❌ FastAPI failed to start. Logs:"
    cat fastapi.log
    exit 1
else
    echo "βœ… FastAPI is running."
fi

# Start Streamlit app on port 8000
echo "✨ Launching Streamlit on port 8000..."
streamlit run app/app.py --server.port 8000