#!/bin/bash # Start Ollama in background echo "Starting Ollama..." ollama serve & # Wait a few seconds for Ollama to be ready sleep 5 # Ensure data directory exists mkdir -p /workspace/pencil_data # Start Streamlit on HF Spaces port echo "Starting Streamlit interface..." cd /workspace streamlit run app.py \ --server.port 7860 \ --server.address 0.0.0.0 \ --browser.gatherUsageStats false