yeswanthvarma/answer-evaluation-app
0
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
๐ Project Overview
This app takes images of handwritten answers and performs:
- OCR to extract text from question, student answer, and reference answer.
- Similarity scoring using a custom-trained XLNet model.
- Bonus logic to adjust the final score based on thresholds.
- 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.
