Spaces:
Configuration error
Configuration error
Update start.sh
Browse files
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 (
|
| 10 |
-
|
| 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
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|