mrzaizai2k / Iris-model-deploy

Just try to deploy a simple ML model like Iris classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iris-model-deploy

Just try to deploy a simple ML model like Iris classification

Here are the steps to run your Flask app with Docker on a new PC and connect to it with HTML:

  1. Install Docker
  2. Clone the project repository:
git clone <repository-url>
  1. Build the Docker image: create new project for that. Open terminal > command prompt >
docker build -t <image-name>
  1. Run the Docker container
docker run -p 5000:5000 <image-name>
  1. Open the templates/index.html file

If you want to connect port 8000 in local host to port 5000 in container

  1. Run the Docker container
docker run -p 8000:5000 <image-name>
  1. Change the file templates/index.html to
fetch('http://localhost:8000/predict', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },

About

Just try to deploy a simple ML model like Iris classification


Languages

Language:Python 48.2%Language:HTML 46.6%Language:Makefile 5.2%