owenkaplinsky dimim commited on
Commit
f1aa4c2
·
verified ·
1 Parent(s): d864cc1

startup for ws proxy server (#10)

Browse files

- adding ws proxy to the start script (08139638cafd247fbc8670a2f49da546e29f3031)


Co-authored-by: Dmitri Moscoglo <dimim@users.noreply.huggingface.co>

Files changed (1) hide show
  1. start.sh +9 -2
start.sh CHANGED
@@ -76,12 +76,19 @@ PY
76
  export SUPERVISOR_API_URL="${SUPERVISOR_API_URL:-http://127.0.0.1:8080/api/v1/supervisor}"
77
  export DATABASE_API_URL="${DATABASE_API_URL:-http://127.0.0.1:8080/api/v1/db}"
78
  export CV_UPLOAD_API_URL="${CV_UPLOAD_API_URL:-http://127.0.0.1:8080/api/v1/cv}"
 
79
 
80
  # Start FastAPI backend
 
81
  uvicorn src.api.app:app --host 0.0.0.0 --port 8080 &
82
 
83
- # Give the API a moment to come up
84
- sleep 2
 
 
 
 
85
 
86
  # Run Gradio frontend
 
87
  python src/frontend/gradio/app.py
 
76
  export SUPERVISOR_API_URL="${SUPERVISOR_API_URL:-http://127.0.0.1:8080/api/v1/supervisor}"
77
  export DATABASE_API_URL="${DATABASE_API_URL:-http://127.0.0.1:8080/api/v1/db}"
78
  export CV_UPLOAD_API_URL="${CV_UPLOAD_API_URL:-http://127.0.0.1:8080/api/v1/cv}"
79
+ export WEBSOCKET_PROXY_URL="${WEBSOCKET_PROXY_URL:-ws://127.0.0.1:8000/ws/realtime}"
80
 
81
  # Start FastAPI backend
82
+ echo "[start.sh] Starting FastAPI backend on port 8080..."
83
  uvicorn src.api.app:app --host 0.0.0.0 --port 8080 &
84
 
85
+ # Start WebSocket proxy service (for voice screening)
86
+ echo "[start.sh] Starting WebSocket proxy on port 8000..."
87
+ uvicorn src.frontend.streamlit.voice_screening_ui.proxy:app --host 0.0.0.0 --port 8000 &
88
+
89
+ # Give the services a moment to come up
90
+ sleep 3
91
 
92
  # Run Gradio frontend
93
+ echo "[start.sh] Starting Gradio frontend on port ${PORT}..."
94
  python src/frontend/gradio/app.py