-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·34 lines (28 loc) · 838 Bytes
/
run.sh
File metadata and controls
executable file
·34 lines (28 loc) · 838 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
29
30
31
32
33
34
#!/bin/bash
echo "======================================"
echo " Sentiment Analysis System"
echo "======================================"
echo ""
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
echo "Activating virtual environment..."
source venv/bin/activate
# Check if dependencies are installed
if ! python -c "import streamlit" 2>/dev/null; then
echo "Installing dependencies..."
pip install -r requirements.txt
fi
# Check if model exists
if [ ! -f "models/model.pkl" ]; then
echo "Training model (this may take a few minutes)..."
python sentiment_analyzer.py
fi
echo ""
echo "======================================"
echo " Starting Application..."
echo "======================================"
echo ""
streamlit run app.py