rdune71's picture
Fix Ollama connection issues and improve error handling for Hugging Face Spaces
6015c25
raw
history blame contribute delete
400 Bytes
#!/bin/bash
echo "Starting AI Life Coach..."
# Start FastAPI backend in background
echo "Starting FastAPI backend..."
uvicorn api.main:app --host 0.0.0.0 --port 8000 &
BACKEND_PID=0
# Give backend a moment to start
sleep 3
# Start Streamlit frontend
echo "Starting Streamlit frontend..."
streamlit run app.py --server.port 8501 --server.address 0.0.0.0
# Kill backend when Streamlit exits
kill