-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
51 lines (41 loc) · 1.13 KB
/
Copy pathsetup.sh
File metadata and controls
51 lines (41 loc) · 1.13 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
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Setup script for Unix/Linux/Mac users
echo ""
echo "========================================"
echo "Sentiment Analysis Project - Setup"
echo "========================================"
echo ""
echo "Checking Python version..."
if ! command -v python3 &> /dev/null; then
echo "ERROR: Python3 not found"
echo "Please install Python 3.10+ from python.org"
exit 1
fi
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2)
echo "Found Python: $PYTHON_VERSION"
echo ""
echo "Creating virtual environment..."
python3 -m venv venv
echo "Activating virtual environment..."
source venv/bin/activate
echo ""
echo "Upgrading pip..."
pip install --upgrade pip setuptools wheel
echo ""
echo "Installing dependencies..."
pip install -r requirements.txt
if [ $? -ne 0 ]; then
echo "ERROR: Failed to install dependencies"
exit 1
fi
echo ""
echo "========================================"
echo "✓ Setup complete!"
echo "========================================"
echo ""
echo "To launch the app, run:"
echo " source venv/bin/activate"
echo " streamlit run app.py"
echo ""
echo "The app will open at http://localhost:8501/"
echo ""