Spaces:
Sleeping
Sleeping
| echo "π Setting up Voice Detection API locally..." | |
| # Check if python3 is available | |
| if ! command -v python3 &> /dev/null; then | |
| echo "β Python 3 not found. Please install Python." | |
| exit 1 | |
| fi | |
| # Create virtual environment if it doesn't exist | |
| if [ ! -d "venv" ]; then | |
| echo "π¦ Creating virtual environment..." | |
| python3 -m venv venv | |
| fi | |
| # Activate venv | |
| source venv/bin/activate | |
| # Install dependencies | |
| echo "β¬οΈ Installing dependencies..." | |
| pip install -r requirements.txt | |
| # Create .env if missing | |
| if [ ! -f ".env" ]; then | |
| echo "π Creating .env file..." | |
| cp .env.example .env | |
| fi | |
| echo "β Setup complete!" | |
| echo "βΆοΈ Starting server on http://localhost:8000" | |
| echo "π API Key: $(grep API_KEY .env | cut -d '=' -f2)" | |
| # Run server | |
| uvicorn app.main:app --reload --port 8000 | |