soupstick commited on
Commit
3c42a62
·
verified ·
1 Parent(s): b56f6fe

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +9 -10
start.sh CHANGED
@@ -2,16 +2,15 @@
2
  set -euxo pipefail
3
 
4
  export PORT="${PORT:-7860}"
5
- export STREAMLIT_BROWSER_GATHERUSAGESTATS=false
6
-
7
  echo "PORT=$PORT AGENT_API_URL=${AGENT_API_URL:-unset}"
8
 
9
- # Start FastAPI (don’t crash UI if uvicorn missing)
10
- if command -v uvicorn >/dev/null 2>&1; then
11
- uvicorn api.main:app --host 0.0.0.0 --port 7861 &
12
- else
13
- echo "WARN: uvicorn not found; skipping agent API"
14
- fi
15
 
16
- # Start Streamlit on $PORT (HF health check)
17
- exec python -m streamlit run app.py --server.address 0.0.0.0 --server.port "$PORT"
 
 
 
 
 
 
2
  set -euxo pipefail
3
 
4
  export PORT="${PORT:-7860}"
 
 
5
  echo "PORT=$PORT AGENT_API_URL=${AGENT_API_URL:-unset}"
6
 
7
+ # Start FastAPI (agent) on 7861
8
+ uvicorn api.main:app --host 0.0.0.0 --port 7861 &
 
 
 
 
9
 
10
+ # Start Gradio UI on $PORT (no Streamlit)
11
+ if [ -f "ui/gradio_app.py" ]; then
12
+ exec python -m ui.gradio_app
13
+ else
14
+ # fallback if you kept Gradio UI in app.py
15
+ exec python app.py
16
+ fi