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