SSZ Interactive3D Viewer - Deployment Guide
Platform: Hugging Face Spaces
Framework: Gradio
Status: Ready to Deploy! 🚀
1. Create Account (2 min)
2. Create Space (2 min)
3. Upload Files (5 min)
4. Configure (3 min)
5. Deploy & Test (3 min)
Total: ~15 minutes to LIVE! 🌐
1. Go to: https://huggingface.co
2. Click "Sign Up"
3. Create account (email or GitHub)
4. Verify email
5. Done!
✅ You're ready! Just log in.
1. Go to: https://huggingface.co/spaces
2. Click: "Create new Space"
Name: ssz-Interactive3D-viewer
(or any name you prefer)
License: ACSL-1.4
(Anti-Capitalist Software License)
SDK: Gradio ← WICHTIG!
Hardware: CPU basic - 2 vCPU, 16 GB RAM (FREE!)
(Can upgrade later if needed)
Visibility: Public
(So anyone can use it!)
Space type: Gradio
3.1: Navigate to Files Tab
In your new Space → Click "Files" tab
3.2: Upload these files ONE BY ONE:
Click "Add file" → "Create a new file"
Name: app.py
Content: Copy from gradio_app.py
Content to upload:
# Copy ENTIRE content from:
# Interactive3D_ssz_viewer/gradio_app.py
#
# NOTE: Rename at top if needed:
# from data_manager import DataManager
# becomes:
# from Interactive3D_ssz_viewer.data_manager import DataManagerClick "Add file" → "Create a new file"
Name: requirements.txt
Content:
dash>=2.14.0
plotly>=5.17.0
numpy>=1.24.0
pandas>=2.0.0
gradio>=4.0.0
astroquery>=0.4.6
astropy>=6.0.0
psutil>=5.9.0
Click "Add file" → "Create a new file"
Name: README.md
Content:
---
title: SSZ Interactive3D Viewer
emoji: 🌌
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: other
---
# 🌌 SSZ Interactive3D Viewer
Interactive 3D Visualization of Segmented Spacetime Physics with Real GAIA DR3 Data
## Features
✨ Real GAIA DR3 astronomical data (1.8 billion stars)
✨ Interactive visualizations
✨ SSZ vs GR comparison
✨ Data export capabilities
✨ Production-ready code
## Usage
1. **Load GAIA Data**: Choose number of stars and toggle real data
2. **Compare Physics**: Generate SSZ vs GR comparison plots
3. **Explore SSZ**: View pure SSZ physics visualizations
4. **Query Regions**: Search Galactic Center and other regions
5. **View Statistics**: Get dataset information
## About
This tool implements the Segmented Spacetime (SSZ) framework with the golden ratio (φ = 1.618...) as a fundamental constant in spacetime geometry.
**Scientific Background:**
- Segment Density: Ξ(r) = 1 - exp(-φ·r/r_s)
- Time Dilation: D_SSZ = 1/(1 + Ξ)
- No singularities at event horizons
## Repository
GitHub: https://github.com/error-wtf/Segmented-Spacetime-Starmaps
## License
© 2025 Carmen Wrede, Lino Casu
Licensed under ACSL v1.4 (Anti-Capitalist Software License)Upload entire Interactive3D_ssz_viewer folder:
Option 1: Upload as ZIP
1. Locally: Zip Interactive3D_ssz_viewer folder
2. HF: Upload → "Upload files"
3. Select ZIP
4. Wait for extraction
Option 2: Upload individually (if ZIP doesn't work)
Create folder: Interactive3D_ssz_viewer/
Upload these files:
- data_manager.py
- catalog_fetchers.py
- comparison_visualizations.py
- phase1_galaxy_engine.py
- phase2_system_details.py
- ssz_data_exporter.py
- __init__.py (create empty file)
# Clone your HF Space
git clone https://huggingface.co/spaces/YOUR_USERNAME/ssz-Interactive3D-viewer
cd ssz-Interactive3D-viewer
# Copy files
cp Interactive3D_ssz_viewer/gradio_app.py app.py
cp Interactive3D_ssz_viewer/requirements.txt requirements.txt
cp -r Interactive3D_ssz_viewer/ .
# Commit
git add .
git commit -m "Initial deployment"
git pushIf modules in subfolder:
# Change:
from data_manager import DataManager
# To:
from Interactive3D_ssz_viewer.data_manager import DataManager✅ gradio>=4.0.0
✅ All dependencies listed
✅ Version numbers compatible
__pycache__/
*.pyc
*.pyo
.pytest_cache/
.env
1. HF detects changes
2. Builds Docker container
3. Installs dependencies
4. Starts Gradio app
5. Assigns URL
Typical time: 5-10 minutes first time
Watch "Logs" tab for:
- Installing dependencies...
- Building application...
- Running on local URL...
- Running on public URL...
✅ When you see public URL → LIVE!
URL: https://huggingface.co/spaces/YOUR_USERNAME/ssz-Interactive3D-viewer
Or direct app:
URL: https://YOUR_USERNAME-ssz-Interactive3D-viewer.hf.space
□ Load Data tab works
□ GAIA queries work
□ Plots generate
□ No errors in logs
□ Performance acceptable
□ All tabs functional
□ Copy share link
□ Test in incognito/private window
□ Share on social media
□ Add to GitHub README
□ Email to colleagues
Settings → Edit Space card
Emoji: 🌌 (astronomy)
Color: blue → purple (gradient)
Tags: astronomy, physics, gaia, ssz
Featured: Request featuring (if popular!)
1. Create banner.png (1200x630)
2. Upload to Space
3. Add to README:

# In app.py, add examples:
demo.launch(
share=True,
examples=[
[100, True], # 100 stars, real data
[1000, False], # 1k stars, synthetic
]
)Space page → Insights
Watch:
- Page views
- Unique users
- API calls
- Errors
- Performance
Users may:
- Report bugs
- Request features
- Ask questions
Be responsive! 😊
1. Reduce default data size
limit=100 instead of 1000
2. Optimize imports
Import only what's needed
3. Add caching
@st.cache_data decorator
4. Upgrade hardware
Settings → Change hardware tier
(Costs money but faster)
1. Check logs for errors
2. Verify requirements versions
3. Test locally first
4. Reduce memory usage
5. Add error handling
1. Edit file directly on HF
2. Commit changes
3. Wait for rebuild
4. Test
# Update locally
# Then:
git add .
git commit -m "Update: ..."
git push
# HF rebuilds automatically□ HF account created
□ Space created
□ Files uploaded
□ app.py
□ requirements.txt
□ README.md
□ Python modules
□ Configuration correct
□ Build successful
□ App accessible
□ All features working
□ No errors in logs
□ Performance acceptable
□ Share link works
□ Added to GitHub README
□ Announced to community
1. Add badge to GitHub README:
[](url)
2. Share on social media:
"🚀 Just deployed SSZ Interactive3D Viewer on @huggingface!
Try it: [URL]"
3. Add to HF profile:
Pin your Space
4. Submit to HF collections:
Astronomy, Physics, Science
5. Write blog post:
Medium, Dev.to, personal blog
□ Watch usage metrics
□ Respond to feedback
□ Fix bugs quickly
□ Add requested features
□ Update documentation
□ Announce updates
Error: "Failed to build"
Solution:
1. Check requirements.txt versions
2. Verify all imports work
3. Test locally first
4. Check logs for specific error
5. Ask in HF Forums if stuck
Error: "App failed to start"
Solution:
1. Verify app.py has launch()
2. Check all imports resolve
3. Verify file paths
4. Check for syntax errors
5. Review logs carefully
Issue: "App is slow"
Solution:
1. Reduce default data size
2. Add caching
3. Optimize queries
4. Upgrade hardware tier
5. Profile code for bottlenecks
Error: "OOM (Out of Memory)"
Solution:
1. Reduce data size limits
2. Clear cache more often
3. Optimize data structures
4. Upgrade to larger instance
5. Add memory cleanup
✅ CPU basic (2 vCPU, 16 GB RAM)
✅ Unlimited usage
✅ Public Spaces only
✅ Community support
Perfect for most use cases!
CPU upgrade: $0.10/hour (faster)
GPU: $0.60/hour (for ML)
Private: $9/month (hide source)
Usually NOT needed for this app!
✅ Public URL accessible
✅ App loads in ~3-5 seconds
✅ GAIA queries work
✅ Plots generate correctly
✅ No crashes
✅ Shareable link
✅ Discoverable on HF
✅ Usage metrics visible
Week 1: 10-50 users
Month 1: 100-500 users
Year 1: 1,000-10,000 users
(With promotion!)
When your Space is live:
✅ Copy share link
✅ Test all features
✅ Add to GitHub README
✅ Announce on social media
✅ Email to colleagues
✅ Celebrate! 🎉
Your app is now:
- 🌍 Accessible worldwide
- 🚀 Running 24/7
- 📊 Tracking metrics
- 🤝 Open for collaboration
- ✨ Making an impact!
HF Spaces: https://huggingface.co/spaces
HF Docs: https://huggingface.co/docs/hub/spaces
Gradio Docs: https://gradio.app/docs
HF Forums: https://discuss.huggingface.co
Your Space: https://huggingface.co/spaces/YOUR_USERNAME/ssz-Interactive3D-viewer
READY TO DEPLOY?
Follow the steps above and your app will be LIVE in ~15 minutes! 🚀
Need help? Let me know! I can guide you through any step! 😊
© 2025 Carmen Wrede, Lino Casu
Licensed under ACSL v1.4