#!/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