-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_streamlit.sh
More file actions
executable file
·66 lines (57 loc) · 1.94 KB
/
run_streamlit.sh
File metadata and controls
executable file
·66 lines (57 loc) · 1.94 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Aparsoft TTS - Streamlit App Launcher
# Quick startup script for the Streamlit management interface
echo "========================================="
echo "🎙️ Aparsoft TTS - Streamlit Manager"
echo "========================================="
echo ""
# Check if virtual environment is activated
if [[ -z "$VIRTUAL_ENV" ]]; then
echo "⚠️ Warning: No virtual environment detected"
echo " It's recommended to use a virtual environment"
echo ""
# Check if venv exists
if [ -d "venv" ]; then
echo "📦 Found virtual environment. Activating..."
source venv/bin/activate
else
echo "❌ No virtual environment found."
echo " Create one with: python -m venv venv"
echo " Then activate with: source venv/bin/activate"
exit 1
fi
fi
# Check if streamlit is installed
if ! python -c "import streamlit" 2>/dev/null; then
echo "❌ Streamlit not found!"
echo " Installing required packages..."
pip install streamlit plotly pandas soundfile
fi
# Check if aparsoft_tts is installed
if ! python -c "import aparsoft_tts" 2>/dev/null; then
echo "❌ aparsoft_tts not found!"
echo " Installing package..."
pip install -e ".[mcp,cli]"
fi
echo ""
echo "✅ All dependencies ready!"
echo ""
echo "🚀 Starting Streamlit app..."
echo " URL: http://localhost:8501"
echo ""
echo " Press Ctrl+C to stop the server"
echo ""
echo "========================================="
# Create required directories
mkdir -p outputs/single outputs/batch outputs/scripts outputs/voice_samples
mkdir -p data config temp/scripts
# Start Streamlit with optimal settings
streamlit run streamlit_app.py \
--server.port=8501 \
--server.address=localhost \
--server.headless=false \
--browser.gatherUsageStats=false \
--theme.base="light" \
--theme.primaryColor="#667eea" \
--theme.backgroundColor="#ffffff" \
--theme.secondaryBackgroundColor="#f0f2f6"