Skip to content

Train and Deploy Machine Learning Model With Web Interface - Docker, PyTorch & Flask

License

Notifications You must be signed in to change notification settings

ahmedbendebba1/Alphanumeric-Recognition-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Train and Deploy Machine Learning Model With Web Interface - Docker, PyTorch & Flask

alt text

Architecture

Architecture

Running on Local/cloud machine

Clone the repo and build the docker image

sudo docker build -t flaskml .

NB: if you have MemoryError while installing PyTorch in the container, please consider adding 2G swap to your virtual machine (https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-18-04/)

Then after that you can run the container while specefying the absolute path to the app

sudo docker run -i -t --rm -p 8888:8888 -v **absolute path to app directory**:/app flaskml

This will run the application on localhost:8888

You can use serveo.net or Ngrok to port the application to the web.

Useful files

Info

This a generic web app for ML models. You can update your the network and weights by changing the following files.

app/ml_model/network.py
app/ml_model/trained_weights.pth

Ahmed Ben Debba

About

Train and Deploy Machine Learning Model With Web Interface - Docker, PyTorch & Flask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published