SATINT-Analyst / test-local.sh
danielrosehill's picture
commit
932db80
raw
history blame
993 Bytes
#!/bin/bash
# Local testing script for SATINT-Analyst Hugging Face Space
# This uses uv for fast dependency management locally
# Hugging Face will still use requirements.txt when deployed
set -e # Exit on error
echo "πŸš€ Setting up local testing environment with uv..."
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "❌ uv is not installed. Install it with: pip install uv"
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
echo "πŸ“¦ Creating virtual environment..."
uv venv
fi
# Activate virtual environment
echo "πŸ”Œ Activating virtual environment..."
source .venv/bin/activate
# Install dependencies from requirements.txt using uv (much faster than pip)
echo "πŸ“₯ Installing dependencies with uv..."
uv pip install -r requirements.txt
# Run the Gradio app
echo "🎯 Starting Gradio app..."
echo "πŸ“ App will be available at http://127.0.0.1:7860"
echo "Press Ctrl+C to stop"
echo ""
python app.py