- Bhavesh Laddagiri (RA1911026030032)
- Akshaj Vishwanathan (RA1911026030003)
- Hardik Gupta (RA1911026030027)
This repository contains the source code for an end-to-end project for handwritten digit classification from training the model to deploying the model as an API using CellStrat Hub and building a Web Application to invoke the API.
Play with the Web Application Here
- The model is trained on the MNIST dataset
- To Train the model, run the Handwritten-Digit-Recognition.ipynb notebook
- Clone the repo in CellStrat Hub Workspace.
- Open a terminal and change directory to
digit-api
. - Directly run the build and deploy command by running the following command:
hub build --deploy
- The process can take around 3 minutes and once deployed you will get your API endpoint.
- To invoke your API you need to create/get your API Key from the Deployment Dashboard
- Now you can invoke your API endpoint and you can make
GET
request to load the model in memory andPOST
request to make predictions by sending a base64 encoded image of the digit.
Learn More about Deployment here
The web application is built using Next.js, styled using TailwindCSS and statically hosted on Netlify. You can find the source code in digit-app.
If you wish to deploy your own version of the application with your own API endpoint and Key you need to specify the environment variables as follows:
- During development, add the endpoint url and key to the
.env.local
file like this
NEXT_PUBLIC_ENDPOINT=https://api.cellstrathub.com/<your username>/digit
NEXT_PUBLIC_API_KEY=<your key here>
- During deployment in Netlify, add these environment variables in your netlify configuration