Skip to content

Pappokhan/ModelLens-AI

Repository files navigation

ModelLensAI - Model Analysis Platform

A production-oriented Flask application for uploading ML and DL model artifacts, benchmarking supported runtimes, logging MLOps metadata, serving inference, monitoring latency, and managing deployment stages.

What this build now supports

  • classical ML artifacts such as joblib, pickle, and serialized sklearn-family models
  • TensorFlow and Keras .keras and .h5 models
  • TensorFlow Lite .tflite
  • TensorFlow SavedModel packaged as .zip
  • PyTorch TorchScript .pt
  • PyTorch checkpoints with structural inspection
  • Ultralytics YOLO .pt/.pth image inference when the runtime library is installed
  • ONNX runtime benchmarking and live inference
  • live prediction from the report page for supported feature and image models
  • MLflow support with JSON fallback logging
  • rate limiting, readiness checks, CLI bootstrapping, and deployment stages

Local run

python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements-lite.txt
# For full TensorFlow support, use Python 3.9-3.12 and install requirements.txt instead.
flask --app run.py init-db
flask --app run.py create-demo-user
python run.py

Open http://127.0.0.1:5000

Demo account:

  • username: demo
  • password: demo123

Production notes

  • use PostgreSQL instead of SQLite
  • use Redis-backed rate limiting storage
  • put the app behind Nginx or another reverse proxy
  • store uploads in object storage if artifacts are large
  • keep secrets in environment variables or a secret manager
  • prefer portable runtime exports for deployment analysis: ONNX, TorchScript, Keras, or TFLite

Environment variables

  • FLASK_ENV=development|production
  • AUTO_INIT_DB=true|false
  • DATABASE_URL=sqlite:///... or PostgreSQL URL
  • RATELIMIT_STORAGE_URI=redis://localhost:6379/0
  • SESSION_COOKIE_SECURE=true|false
  • REMEMBER_COOKIE_SECURE=true|false
  • TRUST_PROXY=true|false
  • MLFLOW_EXPERIMENT_NAME=model-analysis-platform
  • MAX_CONTENT_LENGTH_MB=512

Useful commands

flask --app run.py init-db
flask --app run.py reset-db
flask --app run.py create-demo-user

Supported runtime stacks

  • Machine learning: scikit-learn, XGBoost, LightGBM, CatBoost, skops, joblib/pickle loaders
  • Deep learning: PyTorch, TorchVision, TensorFlow, Keras, TFLite, ONNX Runtime, Ultralytics YOLO
  • Data science: NumPy, Pandas, PyArrow, SciPy, Matplotlib, Seaborn, Plotly, SHAP

UI

  • Enterprise-style upload workflow
  • Registry view with framework badges
  • More detailed deployment report layout
  • Module visibility for ML, DL, data science, and Ultralytics support

About

ModelLens AI – Model Analysis Platform is an intelligent platform for uploading machine learning and deep learning models, analyzing their performance, assessing deployment readiness, and exploring clear, structured insights through a modern and professional interface.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages