Spaces:
Running
Running
Create start.sh
Browse files
start.sh
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Start FastAPI backend in the background
|
| 4 |
+
python -m uvicorn backend:app --host 0.0.0.0 --port 8000 &
|
| 5 |
+
BACKEND_PID=$!
|
| 6 |
+
|
| 7 |
+
# Start Streamlit frontend
|
| 8 |
+
streamlit run app.py --server.port 8501 --server.address 0.0.0.0
|
| 9 |
+
|
| 10 |
+
# Kill backend when frontend stops
|
| 11 |
+
kill $BACKEND_PID
|