How aix-group/webcards works
Project type and purpose
• This is a full-stack Django web application (“WEBCARDS”) whose primary function is to let users upload ML models, datasets, and metadata, then generate HTML “model cards” and data sheets to support FEAT (Fairness, Ethics, Accountability, Transparency) principles.
• Key features (from README and file tree):
• Two Django apps: mc_and_datasheet (core UI, upload handling, generation) and cleanup_sessions (session/file cleanup).
• Uses Django templating plus static assets (CSS/JS) for the frontend.
• Leverages Google’s Model Card Toolkit and a custom library (featai_lib) to build cards.
• Stores uploads in media/uploads, sessions via cookies, metadata in SQLite3.
• CI/CD via GitHub Actions builds/tests a Docker image and pushes to DockerHub.
File structure
• Top‐level files: manage.py, Dockerfile, .github/workflows (CI), requirements.txt, docs/, templates/, utils/, test_input/, db.sqlite3.zip.
• Core Django project: mysite/ (settings.py, urls.py, wsgi.py, asgi.py) + two apps:
• mc_and_datasheet/: handles forms, views, models, templates, static/ (CSS, JS, admin overrides).
• cleanup_sessions/: implements a management command for cleaning old media uploads.
• Utility code: utils/model_card_lib_v2.py, utils/datasheet.py, plus a packaged wheel.
• Documentation in docs/source.
• Test fixtures in test_input/.
README for additional insights
• Confirms use of Django and SQLite3.
• Mentions temporary file storage in media/uploads keyed by session cookie; automatic removal after 1 hour.
• CI/CD pipeline ensures tests pass, Docker image built/published, prevents file accumulation.
Elements
• Clear labels: “User Browser”, “Django Web Server”, “mc_and_datasheet App”, “cleanup_sessions App”, “SQLite3 DB”, “media/uploads”, “Model Card Toolkit”, “GitHub Actions”
• HTTP(S) requests/responses
• DB read/write
• Filesystem write/read
• Library invocation calls
• CI/CD flow (push → test → build → deploy)
• Orange for external libraries/services
Essential architectural elements
• Session management and cleanup is clearly shown (session cookie → cleanup job).
• Use of external card‐generation libraries as sub‐components of mc_and_datasheet.
• Docker container boundary, with mounted volumes for media/uploads and SQLite3.