-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·63 lines (52 loc) · 1.5 KB
/
setup.sh
File metadata and controls
executable file
·63 lines (52 loc) · 1.5 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
58
59
60
61
62
63
#!/bin/bash
# Setup script for Python Parallel Text Handling Processor
# This script automates the initial environment setup
set -e
echo "🚀 Setting up Python Parallel Text Handling Processor..."
# Check if Python 3 is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.9+"
exit 1
fi
echo "✓ Python 3 found"
# 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
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source .venv/bin/activate
# Upgrade pip
echo "📥 Upgrading pip..."
pip install --upgrade pip
# Install dependencies
if [ -f "requirements.txt" ]; then
echo "📚 Installing dependencies from requirements.txt..."
pip install -r requirements.txt
echo "✓ Dependencies installed"
else
echo "❌ requirements.txt not found"
exit 1
fi
# Create necessary directories
echo "📁 Creating necessary directories..."
mkdir -p data/support_text_files
mkdir -p output
mkdir -p improver_output
echo ""
echo "✅ Setup complete!"
echo ""
echo "📝 Next steps:"
echo ""
echo "1. Run the Streamlit dashboard:"
echo " source .venv/bin/activate"
echo " streamlit run streamlit_app.py"
echo ""
echo "2. Or run the batch pipeline:"
echo " python run.py"
echo ""
echo "For more details, see SETUP.md"