tuhulab's picture
Major feature implementations
29ca557
#!/bin/bash
# Setup script for Science Storyteller
echo "🎧 Science Storyteller - Setup Script"
echo "======================================"
# Check Python version
echo ""
echo "Checking Python version..."
python3 --version
# Install Python dependencies
echo ""
echo "Installing Python dependencies..."
pip install -r requirements.txt
# Check if Node.js is available (for MCP arXiv)
echo ""
echo "Checking Node.js installation..."
if command -v node &> /dev/null; then
echo "βœ… Node.js found: $(node --version)"
else
echo "⚠️ Node.js not found. MCP arXiv server requires Node.js."
echo " Install from: https://nodejs.org/"
fi
# Check if npx is available
if command -v npx &> /dev/null; then
echo "βœ… npx found: $(npx --version)"
else
echo "⚠️ npx not found (usually comes with Node.js)"
fi
# Create .env file if it doesn't exist
echo ""
if [ ! -f .env ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo "βœ… .env file created. Please edit it and add your API keys:"
echo " - ANTHROPIC_API_KEY"
echo " - ELEVENLABS_API_KEY"
else
echo "βœ… .env file already exists"
fi
# Create necessary directories
echo ""
echo "Creating necessary directories..."
mkdir -p assets/audio
mkdir -p assets/examples
mkdir -p cache
echo "βœ… Directories created"
# Check API keys
echo ""
echo "Checking environment configuration..."
if [ -f .env ]; then
source .env
if [ -z "$ANTHROPIC_API_KEY" ] || [ "$ANTHROPIC_API_KEY" = "your_anthropic_api_key_here" ]; then
echo "⚠️ ANTHROPIC_API_KEY not set in .env"
else
echo "βœ… ANTHROPIC_API_KEY configured"
fi
if [ -z "$ELEVENLABS_API_KEY" ] || [ "$ELEVENLABS_API_KEY" = "your_elevenlabs_api_key_here" ]; then
echo "⚠️ ELEVENLABS_API_KEY not set in .env"
else
echo "βœ… ELEVENLABS_API_KEY configured"
fi
fi
echo ""
echo "======================================"
echo "Setup complete! πŸŽ‰"
echo ""
echo "Next steps:"
echo "1. Edit .env and add your API keys"
echo "2. Run: python app.py"
echo "3. Open http://localhost:7860 in your browser"
echo ""