fastapi_django_main_live / deploy_notebook.sh
miyataken999
update
3934e0b
#!/bin/bash
# Hugging Face Space deployment script for Jupyter Notebook
set -e
echo "πŸš€ Starting Hugging Face Space deployment..."
# Check if we're in the right directory
if [ ! -f "system_workflow_analysis.ipynb" ]; then
echo "❌ Error: system_workflow_analysis.ipynb not found in current directory"
exit 1
fi
# Configure git for Hugging Face
git config user.name "kenken999"
git config user.email "[email protected]"
# Check git status
echo "πŸ“Š Current git status:"
git status
# Add files if not already staged
if git diff --cached --quiet; then
echo "πŸ“‹ Staging files..."
git add system_workflow_analysis.ipynb
else
echo "βœ… Files already staged"
fi
# Create commit if there are changes
if ! git diff --cached --quiet; then
echo "πŸ’Ύ Creating commit..."
git commit -m "Add comprehensive system workflow analysis Jupyter notebook
Features:
- Complex system workflow visualization with Mermaid diagrams
- Database relationship diagrams (ERD)
- GitHub API integration flow
- Google Chat notification workflow
- Complete approval system workflow
- Real-time system monitoring capabilities
- Interactive controls for system management
This notebook provides comprehensive visualization and analysis
of the automated system generation and approval workflow."
else
echo "βœ… No changes to commit"
fi
# Try to push with credential helper
echo "πŸ”„ Attempting to push to Hugging Face Space..."
# Method 1: Try direct push
if git push origin main 2>/dev/null; then
echo "βœ… Successfully pushed to Hugging Face Space!"
echo "🌐 Notebook available at: https://huggingface.co/spaces/kenken999/fastapi_django_main_live/blob/main/system_workflow_analysis.ipynb"
exit 0
fi
echo "❗ Direct push failed. The notebook has been committed locally."
echo "πŸ“ Manual steps needed:"
echo "1. Go to https://huggingface.co/spaces/kenken999/fastapi_django_main_live"
echo "2. Upload the system_workflow_analysis.ipynb file manually"
echo "3. Or configure your Hugging Face token for git authentication"
echo "πŸ’‘ To set up git authentication with Hugging Face:"
echo " git remote set-url origin https://USER:[email protected]/spaces/kenken999/fastapi_django_main_live"
echo " (Replace USER with your username and TOKEN with your HF token)"