developerPratik's picture
Update README.md
af544b1 verified

A newer version of the Gradio SDK is available: 6.8.0

Upgrade
metadata
title: MNIST Digit Recognition
emoji: 🎯
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
license: mit

🎯 MNIST Digit Recognition Demo

Draw a digit (0-9) and watch the AI recognize it with 99.6% accuracy!

About This Model

This Space demonstrates a Convolutional Neural Network trained on the MNIST dataset, achieving exceptional performance:

  • Test Accuracy: 99.60%
  • Model Size: 271K parameters
  • Architecture: 4-layer CNN with batch normalization
  • Framework: PyTorch

How to Use

  1. Draw a digit in the canvas on the left
  2. Wait a moment for the prediction
  3. See the result with confidence scores for all digits

The model was trained using advanced techniques including:

  • Data augmentation (rotation, scaling, random erasing)
  • OneCycleLR scheduler with warmup
  • Dropout and batch normalization
  • Early stopping

Model Repository

Full training code and model weights: mnist-cnn-classifier

Performance

The model achieves near-perfect accuracy across all digits:

  • Most digits: 99-100% accuracy
  • Balanced performance (no digit is significantly harder)
  • Fast inference (~5ms per image on CPU)

Try it out and see if you can draw digits the model gets wrong! 🎨