voice-detection-api / run_local.sh
Hariharan S
Initial deployment
6822466
raw
history blame contribute delete
820 Bytes
#!/bin/bash
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