Spaces:
Running
Running
File size: 1,439 Bytes
6fc3143 dad5e7d 6fc3143 dad5e7d 0ed929a dad5e7d 6fc3143 7fe8bc4 dad5e7d 7fe8bc4 |
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 |
#!/bin/bash
# ============================================================================
# Vidsimplify Startup Script for Hugging Face Spaces
# ============================================================================
#
# This script starts only the Streamlit app in DIRECT_MODE.
# In DIRECT_MODE, the app executes video generation directly without
# needing a separate API server, which is ideal for Hugging Face Spaces.
#
# For local development with the API server, set DIRECT_MODE=false
# and run: python api_server.py & streamlit run streamlit_app.py
# ============================================================================
# Ensure DIRECT_MODE is enabled for Hugging Face
export DIRECT_MODE=true
# Ensure all required directories exist
mkdir -p media/voiceover/elevenlabs
mkdir -p media/voiceover/gtts
mkdir -p media/voiceover/edge_tts
mkdir -p media/videos
# Start Streamlit with Hugging Face-compatible settings
# - Port 7860 is required by Hugging Face Spaces
# - CORS and file upload settings for proper functionality
echo "🎬 Starting Vidsimplify in Direct Mode..."
echo " Port: 7860"
echo " Mode: Direct (no API server needed)"
echo ""
streamlit run streamlit_app.py \
--server.port 7860 \
--server.address 0.0.0.0 \
--server.enableCORS true \
--server.enableXsrfProtection false \
--server.maxUploadSize 50 \
--server.fileWatcherType none \
--browser.gatherUsageStats false
|