Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.2.0
Required Files for HuggingFace Spaces Deployment
β CRITICAL - Must Upload These Files
Main Application
app.py- Main Gradio application
Core Processing Modules
llm.py- LLM inference (local model support)extractors.py- DOCX/PDF text extractiontagging.py- Speaker identificationchunking.py- Semantic text chunkingvalidation.py- Quality scoring and validationreporting.py- CSV/PDF report generationdashboard.py- Dashboard generationproduction_logger.py- Session logging
Optional but Recommended
quote_extractor.py- Market research quote extraction (now optional)
Configuration
requirements.txt- Python dependenciesREADME.md- Documentation (optional but good practice)
β DO NOT Upload These Files
Local Development Only
.env- Contains local secrets (use Spaces Variables instead)*.log- Log fileslogs/- Log directoryoutputs/- Output directory__pycache__/- Python cache.git/- Git repository
Test Files (Not Needed)
test_*.py- All test scriptscheck_*.py- Check scriptsdebug_*.py- Debug scriptsverify_*.py- Verification scriptsfix_*.py- Fix scriptspatch_*.py- Patch scriptscreate_sample_*.py- Sample creation
Documentation (Optional)
*.mdfiles - Helpful but not required for app to run- You can upload them if you want documentation in your Space
π¦ Minimal File List (Absolute Minimum)
If you want the smallest deployment, upload only these:
app.py
llm.py
extractors.py
tagging.py
chunking.py
validation.py
reporting.py
dashboard.py
production_logger.py
requirements.txt
Quote extraction will be disabled but everything else will work.
π Complete File List (Recommended)
Upload all core files plus quote extraction:
app.py
llm.py
extractors.py
tagging.py
chunking.py
validation.py
reporting.py
dashboard.py
production_logger.py
quote_extractor.py
requirements.txt
README.md (optional)
π How to Check What's Missing
If you get ModuleNotFoundError: No module named 'xyz', you need to upload xyz.py.
Common missing modules:
quote_extractorβ Uploadquote_extractor.pyproduction_loggerβ Uploadproduction_logger.pydashboardβ Uploaddashboard.py
π Folder Structure on HuggingFace Spaces
Your Space should look like:
your-space/
βββ app.py
βββ llm.py
βββ extractors.py
βββ tagging.py
βββ chunking.py
βββ validation.py
βββ reporting.py
βββ dashboard.py
βββ production_logger.py
βββ quote_extractor.py (optional)
βββ requirements.txt
βββ README.md (optional)
Do NOT create subdirectories - keep all Python files in the root.
π Quick Upload Checklist
Before uploading to Spaces:
-
app.py- Main file - All imported modules (llm, extractors, etc.)
-
requirements.txt- Dependencies - Selected GPU hardware in Spaces settings
- No
.envfile included - No test/debug files included
π§ Troubleshooting Import Errors
Error: ModuleNotFoundError: No module named 'quote_extractor'
Fixed! This is now optional - app will work without it.
Error: ModuleNotFoundError: No module named 'extractors'
Solution: Upload extractors.py
Error: ModuleNotFoundError: No module named 'production_logger'
Solution: Upload production_logger.py
Error: ModuleNotFoundError: No module named 'transformers'
Solution: Check requirements.txt is uploaded and correct
π Alternative: Use Git Repository
Instead of manual upload, you can:
- Create a Git repository with only required files
- Connect it to your HuggingFace Space
- Auto-deploy on push
Create .gitignore to exclude:
.env
*.log
logs/
outputs/
__pycache__/
test_*.py
debug_*.py
*.pyc
Last Updated
October 2025