Skip to content

How to serve Machine Learning models in your backend through a REST-ish API using a reverse proxy.

License

Notifications You must be signed in to change notification settings

course-files/ServingMLModels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serving Machine Learning Models through REST APIs using Flask in Python

Key Value
Course Codes BBT 4206
Course Names BBT 4206: Business Intelligence II (Week 4-6 of 13)
Semester August to November 2025
Lecturer Allan Omondi
Contact aomondi@strathmore.edu
Note The lecture contains both theory and practice.
This notebook forms part of the practice.
It is intended for educational purposes only.
Recommended citation: BibTex

Repository Structure

.
├── Docker-Compose.yaml
├── LICENSE
├── Procfile
├── README.md
├── RecommendedCitation.bib
├── api.py
├── app_server_reverse_proxy_server_setup.md
├── assets
│   └── images
│       └── https_localhost.png
├── container-volumes
│   └── nginx
│       ├── certs
│       │   ├── selfsigned.crt
│       │   └── selfsigned.key
│       └── nginx.conf
├── docker-compose-dev.yaml
├── docker-compose-prod.yaml
├── frontend
│   ├── Proxies.png
│   ├── RequestFlow.jpg
│   ├── RequestFlow.png
│   ├── api_consumer.py
│   ├── api_test_DT_classifier.html
│   ├── api_test_DT_regressor.html
│   └── index.html
├── huggingface-spaces-using-gradio
│   ├── app.py
│   └── requirements.txt
├── images
│   ├── Dockerfile.flask-gunicorn-app
│   └── Dockerfile.nginx
├── lab_submission_instructions.md
├── model
│   ├── decisiontree_classifier_baseline.pkl
│   ├── decisiontree_regressor_optimum.pkl
│   ├── knn_classifier_optimum.pkl
│   ├── label_encoders_1b.pkl
│   ├── label_encoders_2.pkl
│   ├── label_encoders_4.pkl
│   ├── label_encoders_5.pkl
│   ├── naive_Bayes_classifier_optimum.pkl
│   ├── onehot_encoder_3.pkl
│   ├── random_forest_classifier_optimum.pkl
│   ├── scaler_4.pkl
│   ├── scaler_5.pkl
│   └── support_vector_classifier_optimum.pkl
├── publicly_serving_the_model_for_validation_by_domain_experts.md
├── requirements.txt
├── rules
├── runtime.txt
├── setup_instructions.md
└── streamlit-sharing-using-streamlit
    ├── app.py
    └── requirements.txt

12 directories, 44 files

Setup Instructions

Lab Manual

Refer to the files below for more details:

  1. api_consumer.py
  2. api.py
  3. api_test_DT_classifier.html
  4. api_test_DT_regressor.html
  5. Reverse Proxy Server and Application Server Setup
  6. Publicly Serving the Model for Validation by Domain Experts

Lab Submission Instructions

About

How to serve Machine Learning models in your backend through a REST-ish API using a reverse proxy.

Topics

Resources

License

Stars

Watchers

Forks