musk12 commited on
Commit
ffeaf38
·
verified ·
1 Parent(s): 401229c

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +15 -0
start.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo "Starting FastAPI backend on port 8000..."
4
+ python stream_api.py 2>&1 &
5
+
6
+ echo "Waiting for FastAPI backend to initialize..."
7
+ until curl --output /dev/null --silent --fail http://127.0.0.1:8000/health; do
8
+ printf '.'
9
+ sleep 1
10
+ done
11
+
12
+ echo ""
13
+ echo "Backend is ready! Launching Gradio UI on port 7860..."
14
+ # Running this in the foreground keeps the container alive and streams UI logs
15
+ exec python gradio_3i1_new.py