Spaces:
Sleeping
Sleeping
| # Character Forge - Startup Script | |
| # ================================= | |
| echo | |
| echo "========================================" | |
| echo "Character Forge - Starting" | |
| echo "========================================" | |
| echo | |
| # Check if GEMINI_API_KEY is set | |
| if [ -z "$GEMINI_API_KEY" ]; then | |
| echo "WARNING: GEMINI_API_KEY environment variable is not set!" | |
| echo | |
| echo "You can either:" | |
| echo "1. Set it now: export GEMINI_API_KEY=your-key-here" | |
| echo "2. Enter it in the UI when the app starts" | |
| echo | |
| echo "Get your API key at: https://aistudio.google.com/app/apikey" | |
| echo | |
| read -p "Press Enter to continue..." | |
| fi | |
| # Check if streamlit is available | |
| if ! python3 -c "import streamlit" 2>/dev/null; then | |
| echo "ERROR: Streamlit is not installed!" | |
| echo | |
| echo "Please run: ./install.sh" | |
| echo | |
| exit 1 | |
| fi | |
| echo "Starting Character Forge..." | |
| echo | |
| echo "Application will open in your browser" | |
| echo "URL: http://localhost:8501" | |
| echo | |
| echo "Press Ctrl+C to stop" | |
| echo | |
| # Change to character_forge_image directory and start | |
| cd character_forge_image | |
| streamlit run app.py | |
| cd .. | |