A newer version of the Streamlit SDK is available:
1.54.0
π Deployment Guide: Hugging Face Spaces
Step-by-Step Instructions
Option 1: Upload via Web Interface (Easiest)
Go to your Space:
- Visit: https://huggingface.co/spaces/AhiBucket/Hand-wave
- Click on "Files" tab
Upload the following files:
app.py(your main application)functions.py(physics engine)requirements.txt(dependencies)README.md(project documentation)
Important Files to Upload:
β app.py β functions.py β requirements.txt β README.mdFiles NOT needed for deployment (optional, for documentation only):
β verify_physics.py β verify_comparison.py β Comparison_Notebook.ipynb β ModularedPresentation.ipynbWait for Build:
- Hugging Face will automatically rebuild your Space
- Check the "Logs" tab to monitor progress
- Build typically takes 2-5 minutes
Option 2: Git Push (Advanced)
If you have Git installed:
# Navigate to your project directory
cd "d:\Documents\SFU\PHYS385_Quantum2\CodeProjects\psi_solve2"
# Initialize git (if not already done)
git init
# Add Hugging Face remote
git remote add hf https://huggingface.co/spaces/AhiBucket/Hand-wave
# Add files
git add app.py functions.py requirements.txt README.md .gitignore
# Commit
git commit -m "Deploy enhanced Quantum Solver with professional UI"
# Push to Hugging Face
git push hf main
π Pre-Deployment Checklist
-
app.py- Enhanced with Plotly and professional UI -
functions.py- Physics engine (already exists) -
requirements.txt- All dependencies listed -
README.md- Professional documentation - Test locally first:
streamlit run app.py
π§ͺ Test Locally Before Deploying
# In your project directory
streamlit run app.py
This will open the app at http://localhost:8501
π§ Troubleshooting
If build fails:
Check requirements.txt:
- Make sure all packages are spelled correctly
- Use compatible versions
Check logs:
- Go to your Space β "Logs" tab
- Look for error messages
Common issues:
- MediaPipe error: If camera features fail, it's OK - they won't work on Hugging Face anyway (no camera access)
- Memory issues: Reduce
N_GRIDin app.py if needed
If you see "opencv-python" error:
Replace in requirements.txt:
opencv-python-headless
π Post-Deployment
Test your Space:
- Visit: https://huggingface.co/spaces/AhiBucket/Hand-wave
- Try all three pages (Simulator, Benchmarks, Theory)
- Test different potentials
Share your work:
- The Space URL is public
- Add it to your CV/resume
- Share with professors and admissions committees
π For Academic Applications
When sharing with Oxford/Cambridge:
Highlight the Verification:
- Show the "Benchmarks & Verification" page
- Emphasize <0.003% error on analytical cases
- Mention QMSolve cross-validation
Emphasize the Theory:
- The "Theory & Method" page shows mathematical rigor
- Demonstrates understanding of numerical methods
Professional Presentation:
- Clean, interactive UI
- Well-documented code
- Comprehensive testing
π Quick Links
- Your Space: https://huggingface.co/spaces/AhiBucket/Hand-wave
- Build Logs: https://huggingface.co/spaces/AhiBucket/Hand-wave?logs=build
- Hugging Face Docs: https://huggingface.co/docs/hub/spaces
Ready to deploy! Just upload the 4 main files via the web interface.