-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_gradio.sh
More file actions
executable file
·40 lines (33 loc) · 1.09 KB
/
Copy pathstart_gradio.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.09 KB
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
39
40
#!/bin/bash
# Start Gradio Web Interface for TraductAL Romansh Translation
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VENV_PATH="$SCRIPT_DIR/.venv"
echo "============================================================"
echo "🇨🇭 TraductAL Romansh Translation System"
echo "============================================================"
echo ""
# Check if virtual environment exists
if [ ! -f "$VENV_PATH/bin/activate" ]; then
echo "❌ Virtual environment not found at $VENV_PATH"
exit 1
fi
# Activate virtual environment
echo "⏳ Activating virtual environment..."
source "$VENV_PATH/bin/activate"
# Check if gradio is installed
if ! python -c "import gradio" 2>/dev/null; then
echo "❌ Gradio not installed"
echo " Run: pip install gradio librosa"
exit 1
fi
echo "✅ Environment ready"
echo ""
echo "📡 Starting Gradio interface..."
echo " Server will be available at: http://localhost:7860"
echo " Press Ctrl+C to stop"
echo ""
echo "============================================================"
echo ""
# Start Gradio app
cd "$SCRIPT_DIR"
python gradio_app.py