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