CoolFace
Apppublic

sdhumale26/MLOps

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

MLOps CT1 – End-to-End Model Deployment & Inference

Student Name: Suparna Dhumale Assignment: MLOps Individual Assignment

Business Problem

A retail bank runs large-scale marketing campaigns to promote term deposits. Since only a small fraction of customers subscribe, the bank wants to predict which customers are most likely to accept the offer, thereby reducing marketing costs and improving conversion rates.

Solution Overview

This project implements a complete MLOps workflow, covering:

1)Model development and evaluation

2)Containerization using Docker

3)Cloud deployment

4)Live inference through a REST API

Model Development

1)Dataset explored and preprocessed (categorical encoding + numerical scaling)

2)Binary classification model trained to predict subscription (yes/no)

3)Model pipeline saved as model.pkl

API Development

Flask REST API implemented

Endpoints:

GET / → Health check

POST /predict → Returns prediction and probability

Sample Response:

{ "predictionlabel": 1, "probabilityof_yes": 0.71, "message": "Prediction successful" }

Docker Containerization

Dockerfile created to package:

1)app.py

2)model.pkl

3)requirements.txt

Ensures environment consistency across deployments

Cloud Deployment

1)The containerized application is deployed on Hugging Face Spaces (Docker-based) as a cloud hosting alternative.

2)Application listens on the dynamic PORT environment variable, as required by Hugging Face.

Inference & Testing

1)Deployed API tested using Bruno REST Client

2)Successful real-time predictions obtained from public endpoint

Repository Structure ├── app.py ├── model.pkl ├── Dockerfile ├── requirements.txt ├── README.md

Conclusion

This project demonstrates a complete MLOps pipeline from local model development to cloud deployment and inference, validating the model’s usability in a production-like environment.