Fix caption cache timing, commit path tracking, and clean up start script

- Move caption cache refresh before UI render so indicators show on load
- Return actual dest paths from commit_batch/commit_global to fix
  caption-on-apply silently failing when files are renamed on collision
- Simplify start.sh to only run NiceGUI (remove Streamlit)
- Add requests to requirements.txt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 18:59:05 +01:00
parent 43772aba68
commit 0c2504ff83
3 changed files with 68 additions and 64 deletions

33
start.sh Normal file → Executable file
View File

@@ -1,18 +1,25 @@
#!/bin/bash
# 1. Navigate to app directory
cd /app
# NiceSorter - Start Script
# Runs the NiceGUI gallery interface on port 8080
# 2. Install dependencies (Including NiceGUI if missing)
# This checks your requirements.txt AND ensures nicegui is present
pip install --no-cache-dir -r requirements.txt
set -e
# 3. Start NiceGUI in the Background (&)
# This runs silently while the script continues
echo "🚀 Starting NiceGUI on Port 8080..."
python3 gallery_app.py &
# Navigate to app directory if running in container
if [ -d "/app" ]; then
cd /app
fi
# 4. Start Streamlit in the Foreground
# This keeps the container running
echo "🚀 Starting Streamlit on Port 8501..."
streamlit run app.py --server.port=8501 --server.address=0.0.0.0
# Install dependencies if requirements.txt exists
if [ -f "requirements.txt" ]; then
echo "📦 Installing dependencies..."
pip install --no-cache-dir -q -r requirements.txt
fi
# Initialize database
echo "🗄️ Initializing database..."
python3 -c "from engine import SorterEngine; SorterEngine.init_db()"
# Start NiceGUI
echo "🚀 Starting NiceSorter on http://0.0.0.0:8080"
exec python3 gallery_app.py