File size: 575 Bytes
eeb0f9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -e

# Try to activate venv if it exists
if [ -f "venv/bin/activate" ]; then
    # shellcheck source=/dev/null
    source venv/bin/activate
fi

# Warn if API key not set
if [ -z "$OPENAI_API_KEY" ]; then
    echo "Warning: OPENAI_API_KEY is not set. Export it before running for production."
    echo "Example: export OPENAI_API_KEY=\"sk-...\""
fi

# Default entrypoint: app.py (required)
if [ -f "app.py" ]; then
    gradio app.py
else
    echo "Error: app.py not found. The default entrypoint is app.py. Create app.py or run manually."
    exit 1
fi