Spaces:
Sleeping
Sleeping
File size: 2,539 Bytes
7163439 f1ad996 7163439 a47415e f1ad996 413c0d5 6b69d68 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
---
title: Answer Evaluation App
emoji: π§
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---
# Answer Evaluation App βοΈ
# π Handwritten Answer Evaluation App using OCR + XLNet
An end-to-end machine learning application that extracts handwritten answers from images and evaluates them using a custom XLNet model trained on semantic similarity.
---
## π Live Demo
π [Try it on Hugging Face Spaces](https://yeswanthvarma-answer-evaluation-app.hf.space)
---
## π Project Overview
This app takes images of handwritten answers and performs:
1. **OCR** to extract text from question, student answer, and reference answer.
2. **Similarity scoring** using a custom-trained XLNet model.
3. **Bonus logic** to adjust the final score based on thresholds.
4. **User interface** to upload images and view the evaluated score.
---
## π§ Core Technologies
- **FastAPI**: Web framework
- **EasyOCR**: For extracting handwritten text
- **Hugging Face Transformers**: XLNet model
- **Custom Training**: Trained on Q-A-R triplets
- **Docker**: For containerized deployment
- **Hugging Face Spaces**: Live hosted app
---
## π¦ Folder Structure
```
answer-evaluation-app/
βββ app.py # FastAPI application
βββ requirements.txt # Dependencies
βββ Dockerfile # For Hugging Face deployment
βββ utils/
β βββ image_processor.py # EasyOCR + preprocessing
β βββ xlnet_model.py # Model load and prediction
βββ templates/
β βββ index.html # Frontend HTML
βββ static/
β βββ css/style.css # UI styling
β βββ js/main.js # JS for client interaction
β βββ uploads/ # Uploaded image storage
```
---
## π Model Details
- **Base Model**: `xlnet-base-cased` (Hugging Face)
- **Custom Trained On**: Question, student answer, reference answer, and human-evaluated scores
- **Loss**: MSELoss
- **Output**: Score from 0 to 100
---
## βοΈ Sample Use Case
- Upload 3 images:
- Question image
- Student handwritten answer
- Reference answer
- App will:
- Extract text
- Score similarity using model
- Apply bonus logic
- Display final score and extracted text
---
## π§βπ» Author
**Yeswanth Varma Gottumukkala**
- Email: yeswanthvarma.g@gmail.com
---
## π License
This project is for educational and research purposes.
Model and app are freely available to explore on Hugging Face Spaces. |