Spaces:
Running
Running
A newer version of the Streamlit SDK is available: 1.57.0
Pushing to HuggingFace Guide
Overview
This guide explains how to push the VAMGUARD_TITAN repository with comprehensive test suite to HuggingFace Spaces.
Prerequisites
- HuggingFace Account: DJ-Goanna-Coding (double N)
- HuggingFace Token: Generate from https://huggingface.co/settings/tokens
- Space Created: TIA-ARCHITECT-CORE space should exist
Method 1: Using the Automated Script
Step 1: Set HuggingFace Token
export HF_TOKEN='your_huggingface_token_here'
Step 2: Run Push Script
./scripts/push_to_huggingface.sh
The script will:
- Verify HF_TOKEN is set
- Add HuggingFace remote
- Show files to be pushed
- Ask for confirmation
- Push to HuggingFace main branch
Method 2: Manual Push
Step 1: Add HuggingFace Remote
git remote add huggingface https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE
Step 2: Configure Git Credentials
git config credential.helper store
When prompted, enter:
- Username:
DJ-Goanna-Coding - Password:
your_huggingface_token
Step 3: Push to HuggingFace
# Push current branch to main on HuggingFace
git push huggingface HEAD:main --force
Method 3: Using HuggingFace CLI
Step 1: Install HuggingFace CLI
pip install huggingface_hub
Step 2: Login
huggingface-cli login
Enter your token when prompted.
Step 3: Push Repository
# Clone the space first (if not already)
git clone https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE
# Copy files to the cloned space
cp -r . TIA-ARCHITECT-CORE/
# Commit and push
cd TIA-ARCHITECT-CORE
git add .
git commit -m "Add comprehensive test suite with 150+ tests"
git push
What Gets Pushed
The following files and directories will be pushed to HuggingFace:
Application Files
app.py- Main Streamlit applicationgenesis_boiler.py- File consolidation toolrequirements.txt- Production dependenciesREADME.md- Updated with test coverage info
Test Suite (NEW)
tests/- Complete test suite (150+ tests)test_genesis_boiler.pytest_worker_watchdog.pytest_self_healing_worker.pytest_apps_script_toolbox.pytest_download_citadel_omega_models.pytest_app.pyconftest.py- Pytest fixtures__init__.py
Test Configuration (NEW)
pytest.ini- Pytest configurationrequirements-test.txt- Test dependenciesTESTING.md- Comprehensive testing documentation
CI/CD (NEW)
.github/workflows/tests.yml- Automated testing workflow
Scripts
scripts/push_to_huggingface.sh- Automated push scriptscripts/download_citadel_omega_models.pyscripts/download_frontier_models_2026.py
Workers
workers/worker_watchdog.pyworkers/self_healing_worker.pyworkers/apps_script_toolbox.pyworkers/README.md
Data
data/models/models_manifest.jsondata/workers/workers_manifest.json
Verification
After pushing, verify the deployment:
- Visit Space: https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE
- Check Build Status: Look for build logs
- Verify Files: Check that all files are present
- Test Application: Once deployed, test the Streamlit app
Common Issues
Issue: Authentication Failed
Solution: Verify token has write permissions
# Check token permissions at:
# https://huggingface.co/settings/tokens
Issue: Space Not Found
Solution: Create space first
# Go to: https://huggingface.co/new-space
# Name: TIA-ARCHITECT-CORE
# SDK: Streamlit
Issue: Build Fails
Solution: Check requirements.txt compatibility
- Ensure all dependencies are compatible with Python 3.13
- Check HuggingFace Spaces build logs
Testing on HuggingFace
While tests won't run automatically on HuggingFace Spaces (it's designed for app deployment), the test suite is included for:
- Documentation: Shows code quality and coverage
- Local Development: Contributors can run tests locally
- GitHub Actions: Tests run on GitHub automatically
- Reference: Tests serve as code examples
Post-Push Checklist
- Verify space is accessible
- Check build completed successfully
- Test Streamlit application loads
- Verify all tabs work correctly
- Check environment variables are set (in Space settings)
- Verify models can be downloaded
- Test worker functionality
Environment Variables for HuggingFace
Set these in Space settings (Settings β Repository secrets):
HF_TOKEN=your_token
GITHUB_TOKEN=your_github_token # Optional
GOOGLE_API_KEY=your_google_key # Optional
Rollback
If there's an issue with the new version:
# Revert to previous commit
git revert HEAD
git push huggingface HEAD:main --force
Support
For issues:
- Check HuggingFace Spaces documentation
- Review build logs in Space settings
- Check GitHub Actions for test results
- Review TESTING.md for test information
Success Criteria
Push is successful when:
- β All files uploaded to HuggingFace
- β Space builds without errors
- β Streamlit app loads and runs
- β Test suite is visible in repository
- β README shows test coverage badges
- β GitHub Actions tests pass
Next Steps After Push
- Monitor Build: Watch HuggingFace build logs
- Test Application: Verify all features work
- Update Documentation: Add HuggingFace Space URL to docs
- Share: Announce updated space with test coverage
- Continuous Improvement: Add more tests as needed