Spaces:
Running
Running
| 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! | |
| 1. **Instant Demo**: Click the "Load Sample Data" button to try the app immediately | |
| 2. **View Results**: Click "Calculate Score" to see how the scoring system works | |
| 3. **Upload Your Own**: Replace sample data with your own handwritten images | |
| ## 🛠️ How to Use | |
| 1. **API Key**: The app comes pre-configured, or enter your Google Gemini API key | |
| 2. **Upload Answer Key**: Teachers upload the handwritten answer key | |
| 3. **Upload Student Response**: Students upload their handwritten answers | |
| 4. **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: | |
| 1. Visit [Google AI Studio](https://makersuite.google.com/app/apikey) | |
| 2. Create a new API key | |
| 3. 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: | |
| ```bash | |
| 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! |