-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathstart.sh
More file actions
57 lines (46 loc) · 1.46 KB
/
Copy pathstart.sh
File metadata and controls
57 lines (46 loc) · 1.46 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
52
53
54
55
56
57
#!/bin/bash
# AI Chatbot - Quick Start Script
# This script sets up and runs the chatbot locally
set -e
echo "🤖 AI Chatbot - Quick Start Setup"
echo "=================================="
echo ""
# Check Python installation
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 | awk '{print $2}')
echo "✅ Found Python $python_version"
echo ""
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
echo "✅ Virtual environment created"
else
echo "✅ Virtual environment already exists"
fi
echo ""
echo "🔧 Activating virtual environment..."
source venv/bin/activate
echo ""
echo "📥 Installing dependencies..."
pip install --upgrade pip > /dev/null
pip install -q -r requirements.txt
echo "✅ Dependencies installed"
echo ""
echo "📚 Downloading NLTK data..."
python -c "import nltk; nltk.download('punkt', quiet=True); nltk.download('wordnet', quiet=True); nltk.download('averaged_perceptron_tagger', quiet=True)" 2>/dev/null
echo "✅ NLTK data downloaded"
echo ""
echo "=================================="
echo "✨ Setup Complete!"
echo "=================================="
echo ""
echo "🚀 Starting the chatbot server..."
echo "📍 Open your browser at: http://localhost:8000"
echo ""
echo "Press Ctrl+C to stop the server"
echo ""
python app.py