Spaces:
Building
Building
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
|