File size: 802 Bytes
8dcf472
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# DealFlow AI — Start script
# Usage: ./scripts/start.sh [--port 7860] [--backend vllm|hf]
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
PORT="${GRADIO_PORT:-7860}"
BACKEND="${LLM_BACKEND:-vllm}"

cd "$PROJECT_DIR"

echo "==> DealFlow AI starting..."
echo "    Port:    $PORT"
echo "    Backend: $BACKEND"

# Load .env if present
if [[ -f ".env" ]]; then
    echo "    Loading .env"
    set -a
    source .env
    set +a
fi

# Check Python deps
if ! python3 -c "import crewai" 2>/dev/null; then
    echo "==> Installing dependencies..."
    pip3 install -r requirements.txt
fi

export LLM_BACKEND="$BACKEND"
export GRADIO_PORT="$PORT"

echo "==> Launching Gradio UI on http://0.0.0.0:$PORT"
python3 ui/app.py