Spaces:
Running
Running
A newer version of the Gradio SDK is available:
6.4.0
metadata
title: Handwriting Assessment App
emoji: ✍️
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.39.0
app_file: app.py
pinned: false
license: mit
short_description: AI handwriting assessment with gemini3n series
✍️ Handwriting Assessment App
An AI-powered web application that allows teachers to upload handwritten answer keys and students to upload their handwritten responses for automatic scoring using Google Gemini with the Gemma-3n-e4b-it model for advanced handwriting recognition.
🚀 Features
- Teacher Interface: Upload handwritten answer keys (images or PDFs)
- Student Interface: Upload handwritten responses (images or PDFs)
- AI-Powered OCR: Uses Google Gemini with Gemma-3n-e4b-it model for accurate handwriting recognition
- Automatic Scoring: Intelligent text comparison with detailed similarity metrics
- Multi-format Support: Supports PNG, JPG, JPEG, and PDF files
- Real-time Processing: Instant text extraction and scoring
- Demo Mode: Try the app instantly with pre-loaded sample data
- Environment Variables: Secure API key management through .env configuration
🎯 Quick Start - Try the Demo!
- Instant Demo: Click the "Load Sample Data" button to try the app immediately
- View Results: Click "Calculate Score" to see how the scoring system works
- Upload Your Own: Replace sample data with your own handwritten images
🛠️ How to Use
- API Key: The app comes pre-configured, or enter your Google Gemini API key
- Upload Answer Key: Teachers upload the handwritten answer key
- Upload Student Response: Students upload their handwritten answers
- Get Results: Click "Calculate Score" to see detailed assessment results
📊 Scoring System
The app provides comprehensive scoring metrics:
- Sequence Similarity: Character-by-character comparison
- Word Similarity: Word-level matching analysis
- Character Similarity: Character-level Jaccard similarity
- Combined Score: Weighted average providing final assessment
🤖 AI Model
- Model: Gemini-2.0-flash-exp (Gemini3n series) via Google Gemini API
- Image Support: Supports 256x256, 512x512, or 768x768 resolution images (optimized for 768x768)
- Input Processing: Automatic image preprocessing to meet model requirements
- Capabilities: Advanced handwriting recognition and text extraction
- Accuracy: High-precision OCR for educational content
🔑 API Key Setup (Optional)
The app includes demo functionality, but for full features you can add your own API key:
- Visit Google AI Studio
- Create a new API key
- Enter it in the app interface or set as environment variable
🎯 Perfect for
- Educational assessments
- Homework grading
- Quiz evaluation
- Handwriting analysis
- Academic research
- Teacher training
- Student self-assessment
🔧 Configuration
The app supports environment variables for easy deployment:
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemma-3n-e4b-it
ENVIRONMENT=production
Start assessing handwritten work with AI precision using the latest Gemma model!