File size: 993 Bytes
932db80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/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