Spaces:
Running
Running
| # Start FastAPI backend in the background | |
| python -m uvicorn backend:app --host 0.0.0.0 --port 8000 & | |
| BACKEND_PID=$! | |
| # Start Streamlit frontend | |
| streamlit run app.py --server.port 8501 --server.address 0.0.0.0 | |
| # Kill backend when frontend stops | |
| kill $BACKEND_PID |