GitHub Actions
Clean sync from GitHub - no large files in history
aca8ab4
#!/bin/bash
# Hugging Face Spaces startup script
# This runs after pip install to fix the mcp dependency conflict
echo "πŸ”§ Fixing MCP dependency conflict..."
pip install --force-reinstall --no-deps mcp==1.17.0
echo "βœ… MCP version fixed!"
pip show mcp | grep Version
# Check if required environment variables are set
echo ""
echo "πŸ” Checking environment variables..."
required_vars=("AZURE_OPENAI_ENDPOINT" "AZURE_OPENAI_API_KEY" "AZURE_OPENAI_DEPLOYMENT_NAME" "AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME")
missing_vars=()
for var in "${required_vars[@]}"; do
if [ -z "${!var}" ]; then
missing_vars+=("$var")
echo "❌ Missing: $var"
else
echo "βœ… Found: $var"
fi
done
if [ ${#missing_vars[@]} -ne 0 ]; then
echo ""
echo "⚠️ ERROR: Missing required environment variables!"
echo "Please set the following in HuggingFace Spaces Settings > Repository secrets:"
for var in "${missing_vars[@]}"; do
echo " - $var"
done
echo ""
echo "See .env.example for the complete list of required variables."
exit 1
fi
echo ""
echo "βœ… All required environment variables are set!"
echo ""
# Start the application
echo "πŸš€ Starting application..."
python app.py