Hand-wave / DEPLOYMENT_GUIDE.md
Ahilan Kumaresan
Add automatic GitHub to Hugging Face sync workflow
6c9b7fc

A newer version of the Streamlit SDK is available: 1.54.0

Upgrade

Deployment Guide: Syncing GitHub to Hugging Face Space

Quick Setup (Choose ONE method)

Method 1: Direct Push to Hugging Face (Recommended)

  1. Get your Hugging Face Token:

  2. Login to Hugging Face CLI:

    huggingface-cli login
    
    • Paste your token when prompted
  3. Clone the Hugging Face Space repository:

    cd d:\Documents\SFU\PHYS385_Quantum2\CodeProjects
    git clone https://huggingface.co/spaces/AhiBucket/Hand-wave huggingface-hand-wave
    
  4. Copy files from GitHub repo to HF Space:

    cd huggingface-hand-wave
    Copy-Item -Path "..\Hand-wave\app.py" -Destination "." -Force
    Copy-Item -Path "..\Hand-wave\functions.py" -Destination "." -Force
    Copy-Item -Path "..\Hand-wave\requirements.txt" -Destination "." -Force
    Copy-Item -Path "..\Hand-wave\README.md" -Destination "." -Force
    
  5. Commit and push to Hugging Face:

    git add .
    git commit -m "Update: Fixed Plotly compatibility for wavefunction display"
    git push
    

Method 2: GitHub Integration (Via Web UI)

  1. Go to your Space Settings:

  2. Connect GitHub Repository:

    • Scroll to "Repository" section
    • Click "Connect to GitHub"
    • Select repository: Ahilan-Bucket/Hand-wave
    • Choose branch: main
    • Click "Save"
  3. Enable Auto-sync:

    • Toggle "Automatically rebuild on push"
    • This will sync your GitHub repo to HF Space automatically

What's Been Done Already βœ…

  1. βœ… Created new GitHub repository: Hand-wave
  2. βœ… Copied all necessary files from psi_solve2
  3. βœ… Fixed Plotly compatibility issues for Hugging Face
  4. βœ… Pushed code to GitHub: https://github.com/Ahilan-Bucket/Hand-wave

What's Next πŸš€

Troubleshooting

If the app doesn't start:

  • Check the build logs in the Hugging Face Space
  • Verify requirements.txt has all dependencies
  • Make sure app.py is in the root directory

If wavefunctions still don't show:

  • The fixes we made should resolve this
  • Check browser console for JavaScript errors
  • Verify Plotly version compatibility