A newer version of the Gradio SDK is available:
6.3.0
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:
# In README.md
short_description: TRIQA-IQA # 9 characters
2. Missing timm Module
Error: ModuleNotFoundError: No module named 'timm'
Quick Fix:
# Add to requirements.txt
timm>=0.6.0
3. Model Files Not Found
Error: FileNotFoundError: [Errno 2] No such file or directory: 'feature_models/...'
Quick Fix:
- Download from Box: https://utexas.box.com/s/8aw6axc2lofouja65uc726lca8b1cduf
- Create directories:
feature_models/andRegression_Models/ - Upload model files to correct locations
4. Build Failures
Error: Various build errors
Quick Fix:
- Check space logs
- Verify all dependencies in requirements.txt
- 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:
# Python CLI
python upload_to_space.py
# Git method
git clone https://huggingface.co/spaces/your-username/triqa-iqa
cd triqa-iqa
cp ../huggingface_demo/* .
git add . && git commit -m "Add TRIQA demo" && git push
Test Locally:
# Test file structure
python test_demo.py
# Test app
python app.py
Update Single File:
python -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
gradio>=4.0.0
torch>=1.8.0
torchvision>=0.9.0
timm>=0.6.0
pillow>=8.0.0
numpy>=1.19.0
scikit-learn>=0.24.0
π― README.md Metadata Template
---
title: TRIQA Image Quality Assessment
emoji: πΌοΈ
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: mit
short_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
- Check build logs in your space
- Verify file paths are correct
- Test locally before uploading
- Check dependencies in requirements.txt
- 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! π―