-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.sh
More file actions
60 lines (50 loc) · 1.57 KB
/
setup.sh
File metadata and controls
60 lines (50 loc) · 1.57 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
#!/bin/bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
echo "🚀 Setting up Video Transcription with AI Persona..."
# Check Python version
if command_exists python3; then
python_version=$(python3 --version 2>&1 | awk '{print $2}')
echo "✓ Found Python version $python_version"
else
echo "❌ Python 3 is required but not found. Please install Python 3.11 or higher."
exit 1
fi
# Check if FFmpeg is installed
if command_exists ffmpeg; then
echo "✓ FFmpeg is installed"
else
echo "❌ FFmpeg is required but not found."
echo "Please install FFmpeg:"
echo "- macOS: brew install ffmpeg"
echo "- Linux: sudo apt-get install ffmpeg"
echo "- Windows: Download from https://ffmpeg.org/download.html"
exit 1
fi
# Check if Ollama is installed
if command_exists ollama; then
echo "✓ Ollama is installed"
else
echo "❌ Ollama is required but not found."
echo "Please install Ollama from https://ollama.ai"
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
source venv/bin/activate
# Install/upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install requirements
echo "Installing requirements..."
pip install -r requirements.txt
echo "✨ Setup complete! To start the application:"
echo "1. Start Ollama server: ollama serve"
echo "2. Pull a model (if not done): ollama pull mistral:instruct"
echo "3. Run the app: streamlit run main.py"