CoolFace
Apppublic

DJ-Goanna-Coding/oppo-node

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
HUGGINGFACE_PUSH.md233 linesDownload Raw Back to root
1# Pushing to HuggingFace Guide2 3## Overview4 5This guide explains how to push the VAMGUARD_TITAN repository with comprehensive test suite to HuggingFace Spaces.6 7## Prerequisites8 91. **HuggingFace Account**: DJ-Goanna-Coding (double N)102. **HuggingFace Token**: Generate from https://huggingface.co/settings/tokens113. **Space Created**: TIA-ARCHITECT-CORE space should exist12 13## Method 1: Using the Automated Script14 15### Step 1: Set HuggingFace Token16 17```bash18export HF_TOKEN='your_huggingface_token_here'19```20 21### Step 2: Run Push Script22 23```bash24./scripts/push_to_huggingface.sh25```26 27The script will:28- Verify HF_TOKEN is set29- Add HuggingFace remote30- Show files to be pushed31- Ask for confirmation32- Push to HuggingFace main branch33 34## Method 2: Manual Push35 36### Step 1: Add HuggingFace Remote37 38```bash39git remote add huggingface https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE40```41 42### Step 2: Configure Git Credentials43 44```bash45git config credential.helper store46```47 48When prompted, enter:49- Username: `DJ-Goanna-Coding`50- Password: `your_huggingface_token`51 52### Step 3: Push to HuggingFace53 54```bash55# Push current branch to main on HuggingFace56git push huggingface HEAD:main --force57```58 59## Method 3: Using HuggingFace CLI60 61### Step 1: Install HuggingFace CLI62 63```bash64pip install huggingface_hub65```66 67### Step 2: Login68 69```bash70huggingface-cli login71```72 73Enter your token when prompted.74 75### Step 3: Push Repository76 77```bash78# Clone the space first (if not already)79git clone https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE80 81# Copy files to the cloned space82cp -r . TIA-ARCHITECT-CORE/83 84# Commit and push85cd TIA-ARCHITECT-CORE86git add .87git commit -m "Add comprehensive test suite with 150+ tests"88git push89```90 91## What Gets Pushed92 93The following files and directories will be pushed to HuggingFace:94 95### Application Files96- `app.py` - Main Streamlit application97- `genesis_boiler.py` - File consolidation tool98- `requirements.txt` - Production dependencies99- `README.md` - Updated with test coverage info100 101### Test Suite (NEW)102- `tests/` - Complete test suite (150+ tests)103  - `test_genesis_boiler.py`104  - `test_worker_watchdog.py`105  - `test_self_healing_worker.py`106  - `test_apps_script_toolbox.py`107  - `test_download_citadel_omega_models.py`108  - `test_app.py`109  - `conftest.py` - Pytest fixtures110  - `__init__.py`111 112### Test Configuration (NEW)113- `pytest.ini` - Pytest configuration114- `requirements-test.txt` - Test dependencies115- `TESTING.md` - Comprehensive testing documentation116 117### CI/CD (NEW)118- `.github/workflows/tests.yml` - Automated testing workflow119 120### Scripts121- `scripts/push_to_huggingface.sh` - Automated push script122- `scripts/download_citadel_omega_models.py`123- `scripts/download_frontier_models_2026.py`124 125### Workers126- `workers/worker_watchdog.py`127- `workers/self_healing_worker.py`128- `workers/apps_script_toolbox.py`129- `workers/README.md`130 131### Data132- `data/models/models_manifest.json`133- `data/workers/workers_manifest.json`134 135## Verification136 137After pushing, verify the deployment:138 1391. **Visit Space**: https://huggingface.co/spaces/DJ-Goanna-Coding/TIA-ARCHITECT-CORE1402. **Check Build Status**: Look for build logs1413. **Verify Files**: Check that all files are present1424. **Test Application**: Once deployed, test the Streamlit app143 144## Common Issues145 146### Issue: Authentication Failed147 148**Solution**: Verify token has write permissions149```bash150# Check token permissions at:151# https://huggingface.co/settings/tokens152```153 154### Issue: Space Not Found155 156**Solution**: Create space first157```bash158# Go to: https://huggingface.co/new-space159# Name: TIA-ARCHITECT-CORE160# SDK: Streamlit161```162 163### Issue: Build Fails164 165**Solution**: Check requirements.txt compatibility166- Ensure all dependencies are compatible with Python 3.13167- Check HuggingFace Spaces build logs168 169## Testing on HuggingFace170 171While tests won't run automatically on HuggingFace Spaces (it's designed for app deployment), the test suite is included for:172 1731. **Documentation**: Shows code quality and coverage1742. **Local Development**: Contributors can run tests locally1753. **GitHub Actions**: Tests run on GitHub automatically1764. **Reference**: Tests serve as code examples177 178## Post-Push Checklist179 180- [ ] Verify space is accessible181- [ ] Check build completed successfully182- [ ] Test Streamlit application loads183- [ ] Verify all tabs work correctly184- [ ] Check environment variables are set (in Space settings)185- [ ] Verify models can be downloaded186- [ ] Test worker functionality187 188## Environment Variables for HuggingFace189 190Set these in Space settings (Settings → Repository secrets):191 192```bash193HF_TOKEN=your_token194GITHUB_TOKEN=your_github_token  # Optional195GOOGLE_API_KEY=your_google_key  # Optional196```197 198## Rollback199 200If there's an issue with the new version:201 202```bash203# Revert to previous commit204git revert HEAD205git push huggingface HEAD:main --force206```207 208## Support209 210For issues:2111. Check HuggingFace Spaces documentation2122. Review build logs in Space settings2133. Check GitHub Actions for test results2144. Review TESTING.md for test information215 216## Success Criteria217 218Push is successful when:219- ✅ All files uploaded to HuggingFace220- ✅ Space builds without errors221- ✅ Streamlit app loads and runs222- ✅ Test suite is visible in repository223- ✅ README shows test coverage badges224- ✅ GitHub Actions tests pass225 226## Next Steps After Push227 2281. **Monitor Build**: Watch HuggingFace build logs2292. **Test Application**: Verify all features work2303. **Update Documentation**: Add HuggingFace Space URL to docs2314. **Share**: Announce updated space with test coverage2325. **Continuous Improvement**: Add more tests as needed233