Team Ai
Apppublic

yeswanthvarma/answer-evaluation-app

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

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:

  1. 1.OCR to extract text from question, student answer, and reference answer.
  2. 2.Similarity scoring using a custom-trained XLNet model.
  3. 3.Bonus logic to adjust the final score based on thresholds.
  4. 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.