Upload TROUBLESHOOTING_QUICK_REFERENCE.md with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146# TRIQA Hugging Face Demo - Quick Troubleshooting Reference
## π¨ Common Errors & Quick Fixes
### 1. Short Description Too Long**Error**: `"short_description" length must be less than or equal to 60 characters long`
**Quick Fix**:```yaml# In README.mdshort_description: TRIQA-IQA # 9 characters```
### 2. Missing timm Module**Error**: `ModuleNotFoundError: No module named 'timm'`
**Quick Fix**:```txt# Add to requirements.txttimm>=0.6.0```
### 3. Model Files Not Found**Error**: `FileNotFoundError: [Errno 2] No such file or directory: 'feature_models/...'`
**Quick Fix**:1. Download from Box: https://utexas.box.com/s/8aw6axc2lofouja65uc726lca8b1cduf2. Create directories: `feature_models/` and `Regression_Models/`3. Upload model files to correct locations
### 4. Build Failures**Error**: Various build errors
**Quick Fix**:1. Check space logs2. Verify all dependencies in requirements.txt3. Test locally: `python app.py`
## π Essential Files Checklist
### Required Files:- [ ] `app.py` - Main application- [ ] `README.md` - Space description- [ ] `requirements.txt` - Dependencies- [ ] `package.json` - Node.js config- [ ] `convnext_original.py` - Model architecture- [ ] `convnext_finetune.py` - Model architecture- [ ] `sample_image/` - Sample images
### Model Files (Download from Box):- [ ] `feature_models/convnext_tiny_22k_224.pth` (170MB)- [ ] `feature_models/triqa_quality_aware.pth` (107MB)- [ ] `Regression_Models/KonIQ_scaler.save`- [ ] `Regression_Models/KonIQ_TRIQA.save` (111MB)
## π§ Quick Commands
### Upload Files:```bash# Python CLIpython upload_to_space.py
# Git methodgit clone https://huggingface.co/spaces/your-username/triqa-iqacd triqa-iqacp ../huggingface_demo/* .git add . && git commit -m "Add TRIQA demo" && git push```
### Test Locally:```bash# Test file structurepython test_demo.py
# Test apppython app.py```
### Update Single File:```bashpython -c "from huggingface_hub import HfApi; api = HfApi(); api.upload_file(path_or_fileobj='filename', path_in_repo='filename', repo_id='S-Rajesh/triqa-iqa', repo_type='space')"```
## π Requirements.txt Template
```txtgradio>=4.0.0torch>=1.8.0torchvision>=0.9.0timm>=0.6.0pillow>=8.0.0numpy>=1.19.0scikit-learn>=0.24.0```
## π― README.md Metadata Template
```yaml---title: TRIQA Image Quality Assessmentemoji: πΌοΈcolorFrom: bluecolorTo: purplesdk: gradiosdk_version: 4.0.0app_file: app.pypinned: falselicense: mitshort_description: TRIQA-IQA---```
## π Space URL Format
```https://huggingface.co/spaces/USERNAME/SPACE-NAME```
Example: `https://huggingface.co/spaces/S-Rajesh/triqa-iqa`
## β‘ Quick Debug Steps
1. **Check build logs** in your space2. **Verify file paths** are correct3. **Test locally** before uploading4. **Check dependencies** in requirements.txt5. **Verify model files** are uploaded
## π Quick Links
- **Space**: https://huggingface.co/spaces/S-Rajesh/triqa-iqa- **Box Download**: https://utexas.box.com/s/8aw6axc2lofouja65uc726lca8b1cduf- **GitHub**: https://github.com/rajeshsureddi/triqa- **Paper**: https://arxiv.org/pdf/2507.12687
## β
Success Indicators
- [ ] Space builds without errors- [ ] Demo interface loads- [ ] Sample images display- [ ] Quality prediction works- [ ] Paper links are accessible
---
**Remember**: Most issues are solved by checking the build logs and ensuring all dependencies are properly listed in requirements.txt! π―TROUBLESHOOTING_QUICK_REFERENCE.mdAdded+146