-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun-mac.sh
More file actions
executable file
·28 lines (22 loc) · 797 Bytes
/
run-mac.sh
File metadata and controls
executable file
·28 lines (22 loc) · 797 Bytes
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
#!/bin/bash
# Navigate to the backend directory
echo "Navigating to backend directory..."
cd backend
# Check if virtual environment exists, if not, create it
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
else
echo "Virtual environment already exists."
fi
# Activate the virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Install required packages if not already installed
echo "Installing required packages..."
pip install --upgrade pip
pip install pandas numpy flask flask-cors scikit-learn
# Start the Flask server to serve the HTML file
echo "Starting backend..."
FLASK_APP=app.py flask run # Serve the HTML file via Flask
# No need to start a separate frontend now, Flask will serve your HTML file