Skip to content

lbcommer/ml-api-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML model dockerized

We are going to build a Docker image to expose a machine learning api. The api call takes a text as argument and predicts the personality of the person who wrote it.

The model has been build using the following dataset:

This is a small dataset so, we can't take too seriously the results but, it's a starting point to build more complex systems. The Machine Learning model is serialized and included into a docker image.

How to build the docker image:

docker build -t ml-api-docker:latest .

The last built image can be found in the following repository on Docker Hub:

https://hub.docker.com/r/lbcommer/ml-api-docker/

How to run the docker container:

docker run -d -p 5000:5000 ml-api-docker:latest

How to use the ML service

To test the api service is working: http://localhost:5000

It will be possible to send a text (msg variable): http://localhost:5000/predict?msg=very%20happy%20experience

TODO

  • Add a model to predict the sentiment of the text
  • To use WSGI for production environment
  • Create as an alternative a serverless version (to be deployed in AWS or GCP)

About

Machine Learning Service Dockerized

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published