Samyc2002 / MNIST-Image-Classification-Task

A ML algorithm to predict the drawn number

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MNIST Flask App

A Flask web app for handwritten digits using a logistic regression model
Used as a follow up assignment with Chapter-1: Basics, ML Workshop, AI-Club, IIT Dharwad

Step 1: Download code

You can download this code using this link https://github.com/deepakhr1999/mnist-flask/archive/master.zip
Uncompress the zip file. The code must be in a folder called mnist-flask-master

Step 2: Google drive link for mnist data

Download these files into the master folder you just downloaded

Step 3: Install requirements

Run this command in the windows powershell

pip install scikit-image flask pandas scikit-learn

Step 4: Complete the missing code

  • Complete missing code in the file named LogisticRegression/train.py
  • In the mnist-flask-master folder, Shift + right-click and open powershell. Run the following command
python LogisticRegression/train.py --savefile SavedModels/logreg.pkl

Step 5: Start the flask app

  • In the mnist-flask-master folder, Shift + right-click and open powershell. Run the following command
python app.py --model LR
  • Open your favourite browser and go to the link http://localhost:5000
  • Draw a digit and hit predict!
  • The model you trained will be used to classify :)
  • Expect medium performance, this is a simple model
  • Way better than trying to write our own code (without ML) to identify patterns.

About

A ML algorithm to predict the drawn number

License:GNU General Public License v3.0


Languages

Language:Python 64.2%Language:HTML 17.5%Language:JavaScript 12.8%Language:CSS 5.5%