-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
Β·39 lines (32 loc) Β· 1.1 KB
/
start.sh
File metadata and controls
executable file
Β·39 lines (32 loc) Β· 1.1 KB
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
34
35
36
37
38
39
#!/bin/bash
# SMS Spam Detection Application Startup Script
echo "π Starting SMS Spam Detection Application"
echo "=========================================="
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "β Python 3 is not installed. Please install Python 3.7 or higher."
exit 1
fi
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "β pip3 is not installed. Please install pip."
exit 1
fi
# Install dependencies if requirements.txt exists
if [ -f "requirements.txt" ]; then
echo "π¦ Installing dependencies..."
pip3 install -r requirements.txt
if [ $? -ne 0 ]; then
echo "β Failed to install dependencies. Please check your Python environment."
exit 1
fi
echo "β
Dependencies installed successfully"
else
echo "β οΈ requirements.txt not found. Skipping dependency installation."
fi
# Start the Flask application
echo "π Starting Flask application..."
echo "π Application will be available at: http://localhost:5001"
echo "π Press Ctrl+C to stop the server"
echo ""
python3 app.py