Spaces:
Sleeping
Sleeping
metadata
title: Digit Recognition API
emoji: π’
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
π’ Digit Recognition API
A machine learning model that recognizes handwritten digits (0-9) with high accuracy.
π Features
- Real-time prediction of handwritten digits
- REST API for integration with external applications
- Web interface for testing and demonstration
- High accuracy trained model
π‘ API Usage
Endpoint
POST https://huggingface.co/proxy/your-username-digit-recognition.hf.space/api/predict
Request Format
Send a POST request with an image file:
import requests
# Upload image file
files = {'data': open('digit_image.png', 'rb')}
response = requests.post(
"https://huggingface.co/proxy/your-username-digit-recognition.hf.space/api/predict",
files=files
)
result = response.json()
print(f"Predicted digit: {result['digit']}")
print(f"Confidence: {result['confidence']:.2%}")
Response Format
{
"digit": "7",
"confidence": 0.95,
"status": "success"
}
π§ Local Development
- Install dependencies:
pip install -r requirements.txt
- Run the app:
python app.py
π Model Requirements
- Input: RGB images resized to 64x64 pixels
- Output: Digit classification (0-9)
- Format: Pickled scikit-learn compatible model
π€ Usage in Applications
Perfect for:
- Educational tools
- Document digitization
- Form processing
- Mobile applications
- Web services
π Support
For issues or questions, please open an issue in this space.