Spaces:
Runtime error
Runtime error
File size: 981 Bytes
0469d65 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#!/bin/bash
echo "π Starting Safety Monitor Application..."
echo "============================================"
# Check if virtual environment exists
if [ ! -d "safety_monitor_env" ]; then
echo "β Virtual environment not found. Please run setup first."
exit 1
fi
# Activate virtual environment
echo "π¦ Activating virtual environment..."
source safety_monitor_env/bin/activate
# Check if required packages are installed
echo "π Checking dependencies..."
if ! python -c "import flask, cv2, ultralytics" &> /dev/null; then
echo "β Some packages are missing. Installing..."
pip install -r requirements.txt
fi
echo "π€ Loading AI model (this may take a moment on first run)..."
echo " Downloading YOLOv8 model (~6MB) if not already cached..."
echo ""
# Start the application
echo "π Starting Safety Monitor Web Application..."
echo " Access dashboard at: http://localhost:8080"
echo " Press Ctrl+C to stop"
echo ""
python web_interface.py |