File size: 1,370 Bytes
7eba88d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
52
53
54
55
56
57
58
59
#!/bin/bash

# Social Intelligence Platform β€” Setup Script
# This script automates the installation process

set -e

echo "πŸš€ Social Intelligence Platform β€” Setup"
echo "======================================="
echo ""

# Check Python version
echo "πŸ“‹ Checking Python version..."
if ! command -v python3 &> /dev/null; then
    echo "❌ Python 3 is not installed. Please install Python 3.8 or higher."
    exit 1
fi

PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
echo "βœ… Found Python $PYTHON_VERSION"
echo ""

# Navigate to backend
echo "πŸ“¦ Installing backend dependencies..."
cd backend

# Install requirements
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

echo "βœ… Backend dependencies installed"
echo ""

# Download NLTK data
echo "πŸ“₯ Downloading NLTK data (for fallback sentiment)..."
python3 -c "import nltk; nltk.download('vader_lexicon', quiet=True)"
echo "βœ… NLTK data downloaded"
echo ""

cd ..

echo "βœ… Setup complete!"
echo ""
echo "🎯 Next steps:"
echo ""
echo "1. Start the backend:"
echo "   cd backend"
echo "   python3 main.py"
echo ""
echo "2. In a new terminal, start the frontend:"
echo "   cd frontend"
echo "   python3 -m http.server 3000"
echo ""
echo "3. Open your browser to:"
echo "   http://localhost:3000"
echo ""
echo "πŸ“š See README.md for detailed instructions"
echo ""