- Create and activate virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install dependencies:
./setup.sh
- Run the application:
PYTHONPATH=. uvicorn src.main:app --reload
- Visit http://localhost:8000 in your browser
src/
- Python source codemain.py
- FastAPI applicationgenerate_assessment_widget.py
- Assessment form generationassessment-data-L1.csv
- Assessment questions and scoring data
templates/
- HTML templatesstatic/
- CSS and other static files
- Build the container:
docker build -t inclusive-space-index .
- Run the container:
docker run -p 7860:7860 inclusive-space-index
- Fork this repository to your GitHub account
- Create a new Space on Hugging Face
- Select Docker as the SDK
- Connect your GitHub repository
- Configure email credentials securely:
- Go to your Space's Settings tab
- Under "Repository secrets", add the following secrets:
SMTP_HOST
SMTP_PORT
SMTP_USER
SMTP_PASS
- These will be securely stored and automatically available as environment variables
- The Space will automatically build and deploy the application
Note: Never commit email credentials directly to the repository. Always use Hugging Face's secrets management for sensitive data.
Each question has five scoring levels:
- None (0 points)
- Basic (0.5 points)
- Partial (1 point)
- Good (2 points)
- Strong (5 points)
- FastAPI - Web framework
- Uvicorn - ASGI server
- Jinja2 - Template engine
- HTMX - Dynamic HTML updates
- Pandas - Data processing
The assessment includes a real-time scoring system that:
- Shows current total score
- Displays completion progress
- Stays visible while scrolling through questions
Users can opt to receive their results via email. This requires:
- Valid email address
- Consent checkbox for data sharing
- Configured SMTP server
PYTHONPATH
- Set to the project rootPORT
- Default: 7860 (for Hugging Face Spaces compatibility)
To enable email sharing of results, configure these SMTP settings:
SMTP_HOST
- Your SMTP server hostname (e.g., smtp.gmail.com)SMTP_PORT
- SMTP port (typically 587 for TLS)SMTP_USER
- SMTP username/emailSMTP_PASS
- SMTP password or app-specific password
Example email setup using Gmail:
- Create a Gmail account or use an existing one
- Enable 2-Step Verification in Google Account settings
- Generate an App Password:
- Go to Google Account → Security
- Under "2-Step Verification", select "App passwords"
- Generate a new app password for "Mail"
- Set environment variables:
export SMTP_HOST=smtp.gmail.com
export SMTP_PORT=587
export [email protected]
export SMTP_PASS=your-app-password
Note: For production deployment:
- On Hugging Face Spaces: Use Repository Secrets as described above
- On other platforms: Use their respective secrets/environment management system
For contribution guidelines, please see CONTRIBUTING.md.